Fix gateway RX indication

Added GW RX indication for MQTT and Serial gateway (PR #585).
Only send RX indication when valid message has been received.
This commit is contained in:
Embedded Innovation
2016-09-22 18:21:02 +02:00
parent 75a100f4e9
commit 8ccb1ca86d
3 changed files with 13 additions and 4 deletions
+5 -1
View File
@@ -58,7 +58,11 @@ bool gatewayTransportAvailable() {
if (inChar == '\n') {
_serialInputString[_serialInputPos] = 0;
bool ok = protocolParse(_serialMsg, _serialInputString);
_serialInputPos = 0;
if (ok)
{
setIndication(INDICATION_GW_RX);
}
_serialInputPos = 0;
return ok;
} else {
// add it to the inputString: