diff --git a/CommandStation-EX.ino b/CommandStation-EX.ino index 3c40bba..7363566 100644 --- a/CommandStation-EX.ino +++ b/CommandStation-EX.ino @@ -75,6 +75,9 @@ void setup() DIAG(F("License GPLv3 fsf.org (c) dcc-ex.com")); +// Initialise HAL layer before reading EEprom or setting up MotorDrivers + IODevice::begin(); + DISPLAY_START ( // This block is still executed for DIAGS if display not in use LCD(0,F("DCC-EX v%S"),F(VERSION)); @@ -96,10 +99,7 @@ void setup() #if ETHERNET_ON EthernetInterface::setup(); #endif // ETHERNET_ON - - // Initialise HAL layer before reading EEprom or setting up MotorDrivers - IODevice::begin(); - + // As the setup of a motor shield may require a read of the current sense input from the ADC, // let's make sure to initialise the ADCee class! ADCee::begin(); diff --git a/IO_duinoNodes.h b/IO_duinoNodes.h index 60ef2ea..c764db2 100644 --- a/IO_duinoNodes.h +++ b/IO_duinoNodes.h @@ -55,6 +55,7 @@ public: pinMode(_clockPin,OUTPUT); pinMode(_dataPin,_pinMap?INPUT_PULLUP:OUTPUT); _display(); + if (!_pinMap) _loopOutput(); } // loop called by HAL supervisor diff --git a/version.h b/version.h index 399f68d..a8c8bde 100644 --- a/version.h +++ b/version.h @@ -4,7 +4,9 @@ #include "StringFormatter.h" -#define VERSION "4.2.40" +#define VERSION "4.2.41" +// 4.2.41 - Move HAl startup to ASAP in setup() +// - Fix DNOU8 output pin setup to all LOW // 4.2.40 - Automatically detect conflicting default I2C devices and disable // 4.2.39 - DFplayer driver now polls device to detect failures and errors. // 4.2.38 - Clean up compiler warning when IO_RotaryEncoder.h included