Debug log levels 0 through 2

pull/194/head
Jeff Lehman 3 months ago
parent 15d6fb050d
commit ec8f0ba25f

@ -43,11 +43,8 @@
#define LORA_SPI_MISO 19
#define LORA_SPI_MOSI 27
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// OLED -- Displays console debugging messages on an SSD1306 I²C OLED
///#define USE_OLED

@ -43,11 +43,8 @@
#define LORA_SPI_MISO 19
#define LORA_SPI_MOSI 27
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// OLED -- Displays console debugging messages on an SSD1306 I²C OLED
///#define USE_OLED

@ -43,11 +43,8 @@
#define LORA_SPI_MISO 19
#define LORA_SPI_MOSI 27
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// OLED -- Displays console debugging messages on an SSD1306 I²C OLED
///#define USE_OLED

@ -43,11 +43,8 @@
#define LORA_SPI_MISO 19
#define LORA_SPI_MOSI 27
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// OLED -- Displays console debugging messages on an SSD1306 I²C OLED
///#define USE_OLED

@ -12,11 +12,8 @@
#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -12,11 +12,8 @@
//#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -12,11 +12,8 @@
//#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -12,11 +12,8 @@
//#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276

@ -12,11 +12,8 @@
#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276

@ -12,11 +12,9 @@
//#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
// #define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -43,11 +43,8 @@
#define LORA_SPI_MISO 19
#define LORA_SPI_MOSI 27
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// OLED -- Displays console debugging messages on an SSD1306 I²C OLED
///#define USE_OLED

@ -43,11 +43,8 @@
#define LORA_SPI_MISO 19
#define LORA_SPI_MOSI 27
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// OLED -- Displays console debugging messages on an SSD1306 I²C OLED
///#define USE_OLED

@ -11,11 +11,8 @@
//#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276

@ -12,11 +12,8 @@
#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276

@ -11,11 +11,8 @@
#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -11,11 +11,8 @@
#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -11,11 +11,8 @@
#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -14,11 +14,8 @@
//#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 // ESP32 SX1276 (TTGO)

@ -11,11 +11,8 @@
#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -11,11 +11,8 @@
#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -11,11 +11,8 @@
#define DEEP_SLEEP
#define POWER_CTRL 22
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -11,11 +11,8 @@
//#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 // ESP32 SX1276 (TTGO)

@ -11,11 +11,8 @@
#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -11,11 +11,8 @@
#define DEEP_SLEEP
#define POWER_CTRL 4
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -11,11 +11,8 @@
#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -11,11 +11,8 @@
#define DEEP_SLEEP
#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -11,11 +11,8 @@
#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -11,11 +11,8 @@
#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -11,11 +11,8 @@
#define DEEP_SLEEP
//#define POWER_CTRL 14
// Choose none or one of the debug options below.
// DEBUG will show some information but for troubleshooting a good level would be FDRS_DEBUG_1
#define FDRS_DEBUG // Enable USB-Serial debugging
// #define FDRS_DEBUG_1 // Additional logging messages for troubleshooting purposes - commment out the other FDRS_DEBUG options
// #define FDRS_DEBUG_2 // Show all logging messages for development purposes - comment out the other FDRS_DEBUG options
// #define DBG_LEVEL 0 // 0 for minimal messaging, 1 for troubleshooting, 2 for development
// LoRa Configuration
#define RADIOLIB_MODULE SX1276 //Tested on SX1276

@ -1,42 +1,27 @@
#if !defined(FDRS_DEBUG) && !defined(FDRS_DEBUG_1) && !defined(FDRS_DEBUG_2)
#ifdef USE_OLED
#define DBG(a) debug_OLED(String(a));
#define DBG1(a)
#define DBG2(a)
#else
#define DBG(a)
#define DBG1(a)
#define DBG2(a)
#endif
#ifndef DBG_LEVEL
#define DBG_LEVEL GLOBAL_DBG_LEVEL
#endif
#ifdef FDRS_DEBUG
#ifdef USE_OLED
#define DBG(a) Serial.println(a); debug_OLED(String(a));
#else
#define DBG(a) Serial.println(a);
#endif // USE_OLED
#define DBG1(a)
#define DBG2(a)
#endif // FDRS_DEBUG
#ifdef FDRS_DEBUG_1
#ifdef USE_OLED
#define DBG(a) Serial.print(" "); Serial.println(a); debug_OLED(String(a));
#else
#define DBG(a) Serial.print(" "); Serial.println(a);
#endif // USE_OLED
#define DBG1(a) Serial.print("[1] "); Serial.println(a);
#define DBG2(a)
#endif //FDRS_DEBUG_1
#ifdef FDRS_DEBUG_2
#ifdef USE_OLED
#define DBG(a) Serial.print(" "); Serial.println(a); debug_OLED(String(a));
#ifdef USE_OLED
#define DBG(a) (" "); Serial.println(a); debug_OLED(String(a));
#else
#define DBG(a) Serial.print(" "); Serial.println(a);
#endif // USE_OLED
#if (DBG_LEVEL == 1)
#define DBG1(a) Serial.print("[1] "); Serial.println(a);
#define DBG2(a)
#endif
#if (DBG_LEVEL >= 2)
#define DBG1(a) Serial.print("[1] "); Serial.println(a);
#define DBG2(a) Serial.print("[2] "); Serial.println(a);
#endif
#else
#define DBG(a) Serial.print(" "); Serial.println(a);
#endif // USE_OLED
#define DBG2(a) Serial.print("[2] "); Serial.println(a);
#define DBG1(a) Serial.print("[1] "); Serial.println(a);
#endif //FDRS_DEBUG_2
#ifdef USE_OLED
#define DBG(a) debug_OLED(String(a));
#else
#define DBG(a)
#endif // USE_OLED
#define DBG1(a)
#define DBG2(a)
#endif // FDRS_DEBUG

@ -6,6 +6,8 @@
#ifndef __FDRS_GLOBALS_h__
#define __FDRS_GLOBALS_h__
#define GLOBAL_DBG_LEVEL 0
#define GLOBAL_WIFI_SSID "Your SSID"
#define GLOBAL_WIFI_PASS "Password"
#define GLOBAL_DNS1_IPADDRESS "8.8.8.8" // Default to Google Primary DNS

Loading…
Cancel
Save