diff --git a/EXRAIL2.cpp b/EXRAIL2.cpp index 52d10e8..31a0de6 100644 --- a/EXRAIL2.cpp +++ b/EXRAIL2.cpp @@ -1129,7 +1129,10 @@ void RMFT2::clockEvent(int16_t clocktime, bool change) { // Hunt for an ONTIME for this time if (Diag::CMD) DIAG(F("Looking for clock event at : %d"), clocktime); - if (change) handleEvent(F("CLOCK"),onClockLookup,clocktime); + if (change) { + handleEvent(F("CLOCK"),onClockLookup,clocktime); + handleEvent(F("CLOCK"),onClockLookup,25*60+clocktime%60); + } } void RMFT2::handleEvent(const FSH* reason,LookList* handlers, int16_t id) { diff --git a/EXRAIL2MacroReset.h b/EXRAIL2MacroReset.h index 181fb5d..6ea195e 100644 --- a/EXRAIL2MacroReset.h +++ b/EXRAIL2MacroReset.h @@ -91,6 +91,7 @@ #undef ONCLOSE #undef ONTIME #undef ONCLOCKTIME +#undef ONCLOCKMINS #undef ONGREEN #undef ONRED #undef ONTHROW @@ -209,6 +210,7 @@ #define ONAMBER(signal_id) #define ONTIME(value) #define ONCLOCKTIME(hours,mins) +#define ONCLOCKMINS(mins) #define ONDEACTIVATE(addr,subaddr) #define ONDEACTIVATEL(linear) #define ONCLOSE(turnout_id) diff --git a/EXRAILMacros.h b/EXRAILMacros.h index 3aa4631..446b388 100644 --- a/EXRAILMacros.h +++ b/EXRAILMacros.h @@ -316,6 +316,7 @@ const HIGHFLASH int16_t RMFT2::SignalDefinitions[] = { #define ONCLOSE(turnout_id) OPCODE_ONCLOSE,V(turnout_id), #define ONTIME(value) OPCODE_ONTIME,V(value), #define ONCLOCKTIME(hours,mins) OPCODE_ONTIME,V((STRIP_ZERO(hours)*60)+STRIP_ZERO(mins)), +#define ONCLOCKMINS(mins) ONCLOCKTIME(25,mins) #define ONDEACTIVATE(addr,subaddr) OPCODE_ONDEACTIVATE,V(addr<<2|subaddr), #define ONDEACTIVATEL(linear) OPCODE_ONDEACTIVATE,V(linear+3), #define ONGREEN(signal_id) OPCODE_ONGREEN,V(signal_id),