1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-27 14:21:25 +01:00

turn PROGBOOST off at PROG off

This commit is contained in:
Harald Barth 2020-09-27 13:26:29 +02:00
parent 1f03d9759d
commit 7cd9e68717

View File

@ -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("<p%c>"), 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("<p%c PROG>"), opcode);
return;
case HASH_KEYWORD_JOIN: