diff --git a/DCC.h b/DCC.h index 61d61f0..00f402d 100644 --- a/DCC.h +++ b/DCC.h @@ -19,6 +19,7 @@ #ifndef DCC_h #define DCC_h #include +#include "config.h" #include "MotorDriver.h" #include "MotorDrivers.h" @@ -50,7 +51,7 @@ SKIPTARGET=0xFF // jump to target // Allocations with memory implications..! // Base system takes approx 900 bytes + 8 per loco. Turnouts, Sensors etc are dynamically created #ifdef ARDUINO_AVR_UNO - const byte MAX_LOCOS=30; + const byte MAX_LOCOS=MAX_MAIN_REGISTERS; #else const byte MAX_LOCOS=50; #endif diff --git a/config.example.h b/config.example.h index 5dbbd2b..43bcb2a 100644 --- a/config.example.h +++ b/config.example.h @@ -36,6 +36,8 @@ The configuration file for DCC++ EX Command Station ///////////////////////////////////////////////////////////////////////////////////// // // DEFINE NUMBER OF MAIN TRACK REGISTER +// THIS ONLY MATTERS ON THE UNO (and compatible) WHERE SPACE IS TIGHT +// THIS IS IGNORED ON OTHER ARDUINOS WHERE THAT IS 50 #define MAX_MAIN_REGISTERS 22