diff --git a/DCCTimerSAMD.cpp b/DCCTimerSAMD.cpp index 463cc64..f878ae5 100644 --- a/DCCTimerSAMD.cpp +++ b/DCCTimerSAMD.cpp @@ -162,7 +162,7 @@ uint16_t ADCee::usedpins = 0; int * ADCee::analogvals = NULL; int ADCee::init(uint8_t pin) { - uint id = pin - A0; + uint8_t id = pin - A0; int value = 0; if (id > NUM_ADC_INPUTS) @@ -210,7 +210,7 @@ int ADCee::read(uint8_t pin, bool fromISR) { #pragma GCC push_options #pragma GCC optimize ("-O3") void ADCee::scan() { - static uint id = 0; // id and mask are the same thing but it is faster to + static uint8_t id = 0; // id and mask are the same thing but it is faster to static uint16_t mask = 1; // increment and shift instead to calculate mask from id static bool waiting = false; diff --git a/DCCTimerSTM32.cpp b/DCCTimerSTM32.cpp index d1f2027..5dd72db 100644 --- a/DCCTimerSTM32.cpp +++ b/DCCTimerSTM32.cpp @@ -237,6 +237,7 @@ int16_t ADCee::ADCmax() { } int ADCee::init(uint8_t pin) { + int value = 0; PinName stmpin = analogInputToPinName(pin); uint32_t stmgpio = stmpin / 16; // 16-bits per GPIO port group on STM32 diff --git a/EXRAIL2MacroReset.h b/EXRAIL2MacroReset.h index b4ffc6d..181fb5d 100644 --- a/EXRAIL2MacroReset.h +++ b/EXRAIL2MacroReset.h @@ -134,6 +134,7 @@ #undef STOP #undef THROW #undef TURNOUT +#undef TURNOUTL #undef UNJOIN #undef UNLATCH #undef VIRTUAL_SIGNAL @@ -254,6 +255,7 @@ #define STOP #define THROW(id) #define TURNOUT(id,addr,subaddr,description...) +#define TURNOUTL(id,addr,description...) #define UNJOIN #define UNLATCH(sensor_id) #define VIRTUAL_SIGNAL(id) diff --git a/EXRAILMacros.h b/EXRAILMacros.h index ee20c1f..3aa4631 100644 --- a/EXRAILMacros.h +++ b/EXRAILMacros.h @@ -361,6 +361,7 @@ const HIGHFLASH int16_t RMFT2::SignalDefinitions[] = { #define STOP OPCODE_SPEED,V(0), #define THROW(id) OPCODE_THROW,V(id), #define TURNOUT(id,addr,subaddr,description...) OPCODE_TURNOUT,V(id),OPCODE_PAD,V(addr),OPCODE_PAD,V(subaddr), +#define TURNOUTL(id,addr,description...) TURNOUT(id,(addr-1)/4+1,(addr-1)%4, description) #define UNJOIN OPCODE_UNJOIN,0,0, #define UNLATCH(sensor_id) OPCODE_UNLATCH,V(sensor_id), #define VIRTUAL_SIGNAL(id) diff --git a/version.h b/version.h index a8c8bde..768e8b2 100644 --- a/version.h +++ b/version.h @@ -5,6 +5,7 @@ #define VERSION "4.2.41" +// 4.2.42 - Added EXRAIL TURNOUTL Macro definition // 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 @@ -72,6 +73,10 @@ // 4.2.11 Exrail IFLOCO feature added // 4.2.10 SIGNAL/SIGNALH bug fix as they were inverted // IO_EXIOExpander.h input speed optimisation +// ONCLOCK and ONCLOCKTIME command added to EXRAIL for EX-FastCLock +// Serial command added for EX-FastClock +// Broadcast added for EX-FastClock +// IO_EXFastClock.h added for I2C FastClock connection // 4.2.9 duinoNodes support // 4.2.8 HIGHMEM (EXRAIL support beyond 64kb) // Withrottle connect/disconnect improvements