Reset message buffer every time a newline is found

This commit is contained in:
Henrik Ekblad
2016-02-20 11:19:05 +01:00
parent c7efee31dd
commit ce6915a2c7
@@ -52,8 +52,7 @@ bool gatewayTransportAvailable() {
if (inChar == '\n') {
_serialInputString[_serialInputPos] = 0;
bool ok = protocolParse(_serialMsg, _serialInputString);
if (ok)
_serialInputPos = 0;
_serialInputPos = 0;
return ok;
} else {
// add it to the inputString: