Reset message buffer every time a newline is found
This commit is contained in:
@@ -52,8 +52,7 @@ bool gatewayTransportAvailable() {
|
|||||||
if (inChar == '\n') {
|
if (inChar == '\n') {
|
||||||
_serialInputString[_serialInputPos] = 0;
|
_serialInputString[_serialInputPos] = 0;
|
||||||
bool ok = protocolParse(_serialMsg, _serialInputString);
|
bool ok = protocolParse(_serialMsg, _serialInputString);
|
||||||
if (ok)
|
_serialInputPos = 0;
|
||||||
_serialInputPos = 0;
|
|
||||||
return ok;
|
return ok;
|
||||||
} else {
|
} else {
|
||||||
// add it to the inputString:
|
// add it to the inputString:
|
||||||
|
|||||||
Reference in New Issue
Block a user