Skip to content

Commit 901811a

Browse files
committed
MySensors Diagnostics
1 parent 6e4206b commit 901811a

File tree

15 files changed

+1168
-10
lines changed

15 files changed

+1168
-10
lines changed

MyConfig.h

+18
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,22 @@
133133
*/
134134
//#define MY_SPECIAL_DEBUG
135135

136+
/**
137+
* @def MY_DIAGNOSTICS
138+
* @brief Define MY_DIAGNOSTICS to show a diagnostics serial user interface
139+
*
140+
*/
141+
//#define MY_DIAGNOSTICS
142+
143+
/**
144+
* @def MY_DIAGNOSTICS_CRYPTO
145+
* @brief Define MY_DIAGNOSTICS_CRYPTO to include crypto testing functions.
146+
*
147+
* This feature is disabled on AVR architectures due to limited flash/RAM space but can be enabled if needed.
148+
*
149+
*/
150+
//#define MY_DIAGNOSTICS
151+
136152
/**
137153
* @def MY_DISABLED_SERIAL
138154
* @brief Define MY_DISABLED_SERIAL if you want to use the UART TX/RX pins as normal I/O pins.
@@ -2400,6 +2416,8 @@
24002416
#define MY_SPECIAL_DEBUG
24012417
#define MY_DISABLED_SERIAL
24022418
#define MY_SPLASH_SCREEN_DISABLED
2419+
#define MY_DIAGNOSTICS
2420+
#define MY_DIAGNOSTICS_CRYPTO
24032421
// linux
24042422
#define MY_LINUX_SERIAL_PORT
24052423
#define MY_LINUX_SERIAL_IS_PTY

MySensors.h

+15-1
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,19 @@
4040
#endif
4141
#include <stdint.h>
4242

43+
#if defined(MY_DIAGNOSTICS)
44+
#if !defined(ARDUINO_ARCH_AVR)
45+
// more flash available
46+
#define MY_DIAGNOSTICS_CRYPTO
47+
#endif
48+
#define MY_DEBUG_VERBOSE_TRANSPORT
49+
#define MY_DEBUG_VERBOSE_TRANSPORT_HAL
50+
#define MY_SPECIAL_DEBUG
51+
#include "core/MyDiagnostics.h"
52+
#endif
53+
4354
#include "MyConfig.h"
4455
#include "core/MyHelperFunctions.cpp"
45-
4656
#include "core/MySplashScreen.h"
4757
#include "core/MySensorsCore.h"
4858

@@ -444,6 +454,10 @@ MY_DEFAULT_RX_LED_PIN in your sketch instead to enable LEDs
444454
#include "core/MySplashScreen.cpp"
445455
#include "core/MySensorsCore.cpp"
446456

457+
#if defined(MY_DIAGNOSTICS)
458+
#include "core/MyDiagnostics.cpp"
459+
#endif
460+
447461
// HW mains
448462
#if defined(ARDUINO_ARCH_AVR)
449463
#include "hal/architecture/AVR/MyMainAVR.cpp"

0 commit comments

Comments
 (0)