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

Merge branch 'progcurlimit'

This commit is contained in:
Harald Barth 2020-09-27 13:26:41 +02:00
commit f6853e5abd

View File

@ -318,6 +318,8 @@ void DCCEXParser::parse(Print *stream, byte *com, bool blocking)
{ {
DCCWaveform::mainTrack.setPowerMode(mode); DCCWaveform::mainTrack.setPowerMode(mode);
DCCWaveform::progTrack.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); StringFormatter::send(stream, F("<p%c>"), opcode);
return; return;
} }
@ -330,6 +332,8 @@ void DCCEXParser::parse(Print *stream, byte *com, bool blocking)
case HASH_KEYWORD_PROG: case HASH_KEYWORD_PROG:
DCCWaveform::progTrack.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 PROG>"), opcode); StringFormatter::send(stream, F("<p%c PROG>"), opcode);
return; return;
case HASH_KEYWORD_JOIN: case HASH_KEYWORD_JOIN: