From 7cd9e687177c99bd1a05f6dcac622dedd62a849d Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sun, 27 Sep 2020 13:26:29 +0200 Subject: [PATCH] turn PROGBOOST off at PROG off --- DCCEXParser.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp index b52a968..8a96e23 100644 --- a/DCCEXParser.cpp +++ b/DCCEXParser.cpp @@ -318,6 +318,8 @@ void DCCEXParser::parse(Print *stream, byte *com, bool blocking) { DCCWaveform::mainTrack.setPowerMode(mode); DCCWaveform::progTrack.setPowerMode(mode); + if (mode == POWERMODE::OFF) + DCC::setProgTrackBoost(false); // Prog track boost mode will not outlive prog track off StringFormatter::send(stream, F(""), opcode); return; } @@ -330,6 +332,8 @@ void DCCEXParser::parse(Print *stream, byte *com, bool blocking) case HASH_KEYWORD_PROG: DCCWaveform::progTrack.setPowerMode(mode); + if (mode == POWERMODE::OFF) + DCC::setProgTrackBoost(false); // Prog track boost mode will not outlive prog track off StringFormatter::send(stream, F(""), opcode); return; case HASH_KEYWORD_JOIN: