mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-04-22 13:01:19 +02:00
Compare commits
5 Commits
409717aca9
...
56a5c8b74e
Author | SHA1 | Date | |
---|---|---|---|
|
56a5c8b74e | ||
|
2172d2e175 | ||
|
86291cbec4 | ||
|
66791b19f5 | ||
|
2c133da140 |
6
DCC.h
6
DCC.h
@ -43,9 +43,9 @@ const uint16_t LONG_ADDR_MARKER = 0x4000;
|
|||||||
// 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
|
||||||
#if defined(HAS_ENOUGH_MEMORY)
|
#if defined(HAS_ENOUGH_MEMORY)
|
||||||
const byte MAX_LOCOS = 50;
|
const byte MAX_LOCOS = 50; // Default 50 for Mega2560, Increase for ESP32 and STM32 Nucleo
|
||||||
#else
|
#else // Adjust Max Locos as needed.
|
||||||
const byte MAX_LOCOS = 30;
|
const byte MAX_LOCOS = 10; // Lower Max Loco for Uno CS, Recommended as a JMRI DecoderPro Programming Station
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class DCC
|
class DCC
|
||||||
|
@ -185,8 +185,10 @@ int DCCTimer::freeMemory() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DCCTimer::reset() {
|
void DCCTimer::reset() {
|
||||||
wdt_enable( WDTO_15MS); // set Arduino watchdog timer for 15ms
|
// 250ms chosen to circumwent bootloader bug which
|
||||||
delay(50); // wait for the prescaller time to expire
|
// hangs at too short timepout (like 15ms)
|
||||||
|
wdt_enable( WDTO_250MS); // set Arduino watchdog timer for 250ms
|
||||||
|
delay(500); // wait for it to happen
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1145,7 +1145,7 @@ void RMFT2::kill(const FSH * reason, int operand) {
|
|||||||
|
|
||||||
int16_t RMFT2::getSignalSlot(int16_t id) {
|
int16_t RMFT2::getSignalSlot(int16_t id) {
|
||||||
|
|
||||||
if (id >= 0) {
|
if (id > 0) {
|
||||||
int sigslot = 0;
|
int sigslot = 0;
|
||||||
int16_t sighandle = 0;
|
int16_t sighandle = 0;
|
||||||
// Trundle down the signal list until we reach the end
|
// Trundle down the signal list until we reach the end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user