Skip to content

Commit

Permalink
MySensors Diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
tekka007 committed Nov 28, 2019
1 parent 3e2c542 commit 00518df
Show file tree
Hide file tree
Showing 15 changed files with 1,167 additions and 10 deletions.
18 changes: 18 additions & 0 deletions MyConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,22 @@
*/
//#define MY_SPECIAL_DEBUG

/**
* @def MY_DIAGNOSTICS
* @brief Define MY_DIAGNOSTICS to show a diagnostics serial user interface
*
*/
//#define MY_DIAGNOSTICS

/**
* @def MY_DIAGNOSTICS_CRYPTO
* @brief Define MY_DIAGNOSTICS_CRYPTO to include crypto testing functions.
*
* This feature is disabled on AVR architectures due to limited flash/RAM space but can be enabled if needed.
*
*/
//#define MY_DIAGNOSTICS

/**
* @def MY_DISABLED_SERIAL
* @brief Define MY_DISABLED_SERIAL if you want to use the UART TX/RX pins as normal I/O pins.
Expand Down Expand Up @@ -2236,6 +2252,8 @@
#define MY_SPECIAL_DEBUG
#define MY_DISABLED_SERIAL
#define MY_SPLASH_SCREEN_DISABLED
#define MY_DIAGNOSTICS
#define MY_DIAGNOSTICS_CRYPTO
// linux
#define MY_LINUX_SERIAL_PORT
#define MY_LINUX_SERIAL_IS_PTY
Expand Down
16 changes: 15 additions & 1 deletion MySensors.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,19 @@
#endif
#include <stdint.h>

#if defined(MY_DIAGNOSTICS)
#if !defined(ARDUINO_ARCH_AVR)
// more flash available
#define MY_DIAGNOSTICS_CRYPTO
#endif
#define MY_DEBUG_VERBOSE_TRANSPORT
#define MY_DEBUG_VERBOSE_TRANSPORT_HAL
#define MY_SPECIAL_DEBUG
#include "core/MyDiagnostics.h"
#endif

#include "MyConfig.h"
#include "core/MyHelperFunctions.cpp"

#include "core/MySplashScreen.h"
#include "core/MySensorsCore.h"

Expand Down Expand Up @@ -432,6 +442,10 @@ MY_DEFAULT_RX_LED_PIN in your sketch instead to enable LEDs
#include "core/MySplashScreen.cpp"
#include "core/MySensorsCore.cpp"

#if defined(MY_DIAGNOSTICS)
#include "core/MyDiagnostics.cpp"
#endif

// HW mains
#if defined(ARDUINO_ARCH_AVR)
#include "hal/architecture/AVR/MyMainAVR.cpp"
Expand Down
Loading

0 comments on commit 00518df

Please sign in to comment.