Formula Student Electronics & Software
The code for the embedded software
Loading...
Searching...
No Matches
debug.h File Reference
#include <Arduino.h>
Include dependency graph for debug.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _LOG(prefix, ...)   Serial.printf("[" prefix "] " __VA_ARGS__)
 Logs the given formatted message using the given prefix.
 
#define INFO(...)   _LOG("INFO", __VA_ARGS__)
 
#define LOG(...)   _LOG("LOG", __VA_ARGS__)
 
#define ALERT(...)   _LOG("ALERT", __VA_ARGS__)
 
#define ERROR(...)   Serial.printf("[ERROR] " __VA_ARGS__)
 
#define DATA_DISPLAY   0
 

Macro Definition Documentation

◆ _LOG

#define _LOG (   prefix,
  ... 
)    Serial.printf("[" prefix "] " __VA_ARGS__)

Logs the given formatted message using the given prefix.

THIS FILE DEFINES MACROS FOR INTERNAL LOGGING PURPOSES *

Parameters
prefixthe prefix to use when logging this message

Definition at line 15 of file debug.h.

◆ ALERT

#define ALERT (   ...)    _LOG("ALERT", __VA_ARGS__)

Prints the formatted message with level ALERT

Definition at line 30 of file debug.h.

◆ DATA_DISPLAY

#define DATA_DISPLAY   0

Definition at line 45 of file debug.h.

◆ ERROR

#define ERROR (   ...)    Serial.printf("[ERROR] " __VA_ARGS__)

Prints the formatted message with level ERROR

Definition at line 35 of file debug.h.

◆ INFO

#define INFO (   ...)    _LOG("INFO", __VA_ARGS__)

Prints the formatted message with level INFO

Definition at line 20 of file debug.h.

◆ LOG

#define LOG (   ...)    _LOG("LOG", __VA_ARGS__)

Prints the formatted message with level LOG

Definition at line 25 of file debug.h.