1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-07-28 18:03:45 +02:00

Ack current setable by debug statement D ACK LIMIT n

This commit is contained in:
Harald Barth
2020-10-08 23:39:04 +02:00
parent 3f06fb08df
commit 1c2df3fe22
4 changed files with 26 additions and 10 deletions

View File

@@ -47,6 +47,7 @@ const int HASH_KEYWORD_DCC = 6436;
const int HASH_KEYWORD_SLOW = -17209;
const int HASH_KEYWORD_PROGBOOST = -6353;
const int HASH_KEYWORD_EEPROM = -7168;
const int HASH_KEYWORD_LIMIT = 27413;
int DCCEXParser::stashP[MAX_PARAMS];
bool DCCEXParser::stashBusy;
@@ -586,7 +587,11 @@ bool DCCEXParser::parseD(Print *stream, int params, int p[])
break;
case HASH_KEYWORD_ACK: // <D ACK ON/OFF>
Diag::ACK = onOff;
if (params >= 2 && p[1] == HASH_KEYWORD_LIMIT) {
DCCWaveform::progTrack.setAckLimit(p[2]);
StringFormatter::send(stream, F("\nAck limit=%dmA\n"), p[2]);
} else
Diag::ACK = onOff;
return true;
case HASH_KEYWORD_CMD: // <D CMD ON/OFF>