Skip to content

Commit 47f8223

Browse files
committed
MySensors Diagnostics
1 parent 74e566f commit 47f8223

File tree

15 files changed

+1182
-10
lines changed

15 files changed

+1182
-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.
@@ -2230,6 +2246,8 @@
22302246
#define MY_SPECIAL_DEBUG
22312247
#define MY_DISABLED_SERIAL
22322248
#define MY_SPLASH_SCREEN_DISABLED
2249+
#define MY_DIAGNOSTICS
2250+
#define MY_DIAGNOSTICS_CRYPTO
22332251
// linux
22342252
#define MY_LINUX_SERIAL_PORT
22352253
#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

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

445+
#if defined(MY_DIAGNOSTICS)
446+
#include "core/MyDiagnostics.cpp"
447+
#endif
448+
435449
// HW mains
436450
#if defined(ARDUINO_ARCH_AVR)
437451
#include "hal/architecture/AVR/MyMainAVR.cpp"

0 commit comments

Comments
 (0)