mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-24 13:21:23 +01:00
check power overload only when not ack check
This commit is contained in:
parent
77ee57eb83
commit
836ccc143e
9
DCCEX.h
9
DCCEX.h
@ -44,9 +44,10 @@
|
||||
#include "LCN.h"
|
||||
#include "freeMemory.h"
|
||||
|
||||
#if __has_include ( "myAutomation.h")
|
||||
#include "RMFT.h"
|
||||
#define RMFT_ACTIVE
|
||||
#endif
|
||||
// not yet in this branch
|
||||
//#if __has_include ( "myAutomation.h")
|
||||
// #include "RMFT.h"
|
||||
// #define RMFT_ACTIVE
|
||||
//#endif
|
||||
|
||||
#endif
|
||||
|
@ -60,8 +60,6 @@ volatile bool ackflag = 0;
|
||||
#endif
|
||||
|
||||
void IRAM_ATTR DCCWaveform::loop(bool ackManagerActive) {
|
||||
mainTrack.checkPowerOverload(false);
|
||||
progTrack.checkPowerOverload(ackManagerActive);
|
||||
#ifdef SLOW_ANALOG_READ
|
||||
if (ackflag) {
|
||||
progTrack.checkAck();
|
||||
@ -69,8 +67,13 @@ void IRAM_ATTR DCCWaveform::loop(bool ackManagerActive) {
|
||||
portENTER_CRITICAL(&timerMux);
|
||||
ackflag = 0;
|
||||
portEXIT_CRITICAL(&timerMux);
|
||||
} else {
|
||||
progTrack.checkPowerOverload(ackManagerActive);
|
||||
}
|
||||
#else
|
||||
progTrack.checkPowerOverload(ackManagerActive);
|
||||
#endif
|
||||
mainTrack.checkPowerOverload(false);
|
||||
}
|
||||
|
||||
void IRAM_ATTR DCCWaveform::interruptHandler() {
|
||||
|
Loading…
Reference in New Issue
Block a user