Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySensors Diagnostics #1333

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -2400,6 +2416,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 @@ -444,6 +454,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