Browse Source

Move debug defines to their own header

rfm69
Xose Pérez 6 years ago
parent
commit
265991eacd
4 changed files with 19 additions and 17 deletions
  1. +1
    -0
      code/espurna/config/all.h
  2. +17
    -0
      code/espurna/config/debug.h
  3. +0
    -16
      code/espurna/config/dependencies.h
  4. +1
    -1
      code/espurna/config/general.h

+ 1
- 0
code/espurna/config/all.h View File

@ -33,6 +33,7 @@
#include "sensors.h" #include "sensors.h"
#include "progmem.h" #include "progmem.h"
#include "dependencies.h" #include "dependencies.h"
#include "debug.h"
#ifdef USE_CORE_VERSION_H #ifdef USE_CORE_VERSION_H
#include "core_version.h" #include "core_version.h"


+ 17
- 0
code/espurna/config/debug.h View File

@ -0,0 +1,17 @@
#pragma once
// -----------------------------------------------------------------------------
// Debug
// -----------------------------------------------------------------------------
#define DEBUG_SUPPORT DEBUG_SERIAL_SUPPORT || DEBUG_UDP_SUPPORT || DEBUG_TELNET_SUPPORT || DEBUG_WEB_SUPPORT
#if DEBUG_SUPPORT
#define DEBUG_MSG(...) debugSend(__VA_ARGS__)
#define DEBUG_MSG_P(...) debugSend_P(__VA_ARGS__)
#endif
#ifndef DEBUG_MSG
#define DEBUG_MSG(...)
#define DEBUG_MSG_P(...)
#endif

+ 0
- 16
code/espurna/config/dependencies.h View File

@ -48,19 +48,3 @@
#undef NTP_SUPPORT #undef NTP_SUPPORT
#define NTP_SUPPORT 1 // Scheduler needs NTP #define NTP_SUPPORT 1 // Scheduler needs NTP
#endif #endif
// -----------------------------------------------------------------------------
// Debug
// -----------------------------------------------------------------------------
#define DEBUG_SUPPORT DEBUG_SERIAL_SUPPORT || DEBUG_UDP_SUPPORT || DEBUG_TELNET_SUPPORT || DEBUG_WEB_SUPPORT
#if DEBUG_SUPPORT
#define DEBUG_MSG(...) debugSend(__VA_ARGS__)
#define DEBUG_MSG_P(...) debugSend_P(__VA_ARGS__)
#endif
#ifndef DEBUG_MSG
#define DEBUG_MSG(...)
#define DEBUG_MSG_P(...)
#endif

+ 1
- 1
code/espurna/config/general.h View File

@ -128,7 +128,7 @@
#define SYSTEM_CHECK_ENABLED 1 // Enable crash check by default #define SYSTEM_CHECK_ENABLED 1 // Enable crash check by default
#endif #endif
#ifndef SYSTEM_CHECK_MAX
#ifndef SYSTEM_CHECK_TIME
#define SYSTEM_CHECK_TIME 60000 // The system is considered stable after these many millis #define SYSTEM_CHECK_TIME 60000 // The system is considered stable after these many millis
#endif #endif


Loading…
Cancel
Save