mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-07-28 09:53:45 +02:00
Cleanup and ACK debugs
This commit is contained in:
@@ -45,7 +45,7 @@ void DCCEXParser::loop(Stream & stream) {
|
||||
}
|
||||
else if (ch == '>') {
|
||||
buffer[bufferLength]='\0';
|
||||
parse( stream, buffer);
|
||||
parse( stream, buffer, false); // Parse this allowing async responses
|
||||
inCommandPayload = false;
|
||||
break;
|
||||
} else if(inCommandPayload) {
|
||||
@@ -109,8 +109,9 @@ void DCCEXParser::setFilter(FILTER_CALLBACK filter) {
|
||||
}
|
||||
|
||||
// See documentation on DCC class for info on this section
|
||||
void DCCEXParser::parse(Print & stream, const byte *com) {
|
||||
void DCCEXParser::parse(Print & stream, const byte *com, bool banAsync) {
|
||||
DIAG(F("\nPARSING:%s\n"),com);
|
||||
asyncBanned=banAsync;
|
||||
(void) EEPROM; // tell compiler not to warn thi is unused
|
||||
int p[MAX_PARAMS];
|
||||
byte params=splitValues(p, com);
|
||||
@@ -353,7 +354,7 @@ bool DCCEXParser::parseS( Print & stream,int params, int p[]) {
|
||||
|
||||
// CALLBACKS must be static
|
||||
bool DCCEXParser::stashCallback(Print & stream,int p[MAX_PARAMS]) {
|
||||
if (stashBusy) return false;
|
||||
if (stashBusy || asyncBanned) return false;
|
||||
stashBusy=true;
|
||||
stashStream=stream;
|
||||
memcpy(stashP,p,MAX_PARAMS*sizeof(p[0]));
|
||||
|
Reference in New Issue
Block a user