1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-25 05:31:24 +01:00

check power overload only when not ack check

This commit is contained in:
Harald Barth 2021-11-03 09:45:30 +01:00
parent 77ee57eb83
commit 836ccc143e
2 changed files with 10 additions and 6 deletions

View File

@ -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

View File

@ -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() {