1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-27 10:06:13 +01:00

update to 5.2.21 startup-delay

update to 5.2.21 startup-delay
This commit is contained in:
Ash-4 2024-01-08 19:05:13 -06:00 committed by GitHub
commit 3455dfd20c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -76,6 +76,12 @@ void setup()
DIAG(F("License GPLv3 fsf.org (c) dcc-ex.com")); DIAG(F("License GPLv3 fsf.org (c) dcc-ex.com"));
// If user has defined a startup delay, delay here before starting IO
#if defined(STARTUP_DELAY)
DIAG(F("Delaying startup for %dms"), STARTUP_DELAY);
delay(STARTUP_DELAY);
#endif
// Initialise HAL layer before reading EEprom or setting up MotorDrivers // Initialise HAL layer before reading EEprom or setting up MotorDrivers
IODevice::begin(); IODevice::begin();

View File

@ -222,6 +222,14 @@ The configuration file for DCC-EX Command Station
// We do not support to use the same address, for example 100(long) and 100(short) // We do not support to use the same address, for example 100(long) and 100(short)
// at the same time, there must be a border. // at the same time, there must be a border.
/////////////////////////////////////////////////////////////////////////////////////
// Some newer 32bit microcontrollers boot very quickly, so powering on I2C and other
// peripheral devices at the same time may result in the CommandStation booting too
// quickly to detect them.
// To work around this, uncomment the STARTUP_DELAY line below and set a value in
// milliseconds that works for your environment, default is 3000 (3 seconds).
// #define STARTUP_DELAY 3000
///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
// //
// DEFINE TURNOUTS/ACCESSORIES FOLLOW NORM RCN-213 // DEFINE TURNOUTS/ACCESSORIES FOLLOW NORM RCN-213