From 263c3d01e3fc841a0623a27c98d3b8615159c04d Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sun, 7 Apr 2024 09:26:32 +0200 Subject: [PATCH] DISABLE_DIAG by default for Uno and Nano --- config.example.h | 13 +++++++++++++ defines.h | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/config.example.h b/config.example.h index a2e08b2..3fc86c3 100644 --- a/config.example.h +++ b/config.example.h @@ -211,6 +211,19 @@ The configuration file for DCC-EX Command Station // #define DISABLE_VDPY // #define ENABLE_VDPY +///////////////////////////////////////////////////////////////////////////////////// +// DISABLE / ENABLE DIAG +// +// To diagose different errors, you can turn on differnet messages. This costs +// program memory which we do not have enough on the Uno and Nano, so it is +// by default DISABLED on those. If you think you can fit it (for example +// having disabled some of the features above) you can enable it with +// ENABLE_DIAG. You can even disable it on all other CPUs with +// DISABLE_DIAG +// +// #define DISABLE_DIAG +// #define ENABLE_DIAG + ///////////////////////////////////////////////////////////////////////////////////// // REDEFINE WHERE SHORT/LONG ADDR break is. According to NMRA the last short address // is 127 and the first long address is 128. There are manufacturers which have diff --git a/defines.h b/defines.h index 14dd1c5..2c3ee55 100644 --- a/defines.h +++ b/defines.h @@ -220,9 +220,15 @@ // #if defined(ARDUINO_AVR_NANO) || defined(ARDUINO_AVR_UNO) #define IO_NO_HAL // HAL too big whatever you disable otherwise + #ifndef ENABLE_VDPY #define DISABLE_VDPY #endif + +#ifndef ENABLE_DIAG +#define DISABLE_DIAG +#endif + #endif #if __has_include ( "myAutomation.h")