1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +01:00

make number of slots in Uno configurable

This commit is contained in:
Harald Barth 2020-09-22 23:24:30 +02:00
parent 9bb9fa5e84
commit 9e1d85f9bb
2 changed files with 4 additions and 1 deletions

3
DCC.h
View File

@ -19,6 +19,7 @@
#ifndef DCC_h #ifndef DCC_h
#define DCC_h #define DCC_h
#include <Arduino.h> #include <Arduino.h>
#include "config.h"
#include "MotorDriver.h" #include "MotorDriver.h"
#include "MotorDrivers.h" #include "MotorDrivers.h"
@ -50,7 +51,7 @@ SKIPTARGET=0xFF // jump to target
// Allocations with memory implications..! // Allocations with memory implications..!
// Base system takes approx 900 bytes + 8 per loco. Turnouts, Sensors etc are dynamically created // Base system takes approx 900 bytes + 8 per loco. Turnouts, Sensors etc are dynamically created
#ifdef ARDUINO_AVR_UNO #ifdef ARDUINO_AVR_UNO
const byte MAX_LOCOS=30; const byte MAX_LOCOS=MAX_MAIN_REGISTERS;
#else #else
const byte MAX_LOCOS=50; const byte MAX_LOCOS=50;
#endif #endif

View File

@ -36,6 +36,8 @@ The configuration file for DCC++ EX Command Station
///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
// //
// DEFINE NUMBER OF MAIN TRACK REGISTER // 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 #define MAX_MAIN_REGISTERS 22