Fix another problem related to config from controller (reading wrong position at startup!). Bugfix. Only strip carriage return on serial data from controller (at gateway)
This commit is contained in:
@@ -169,8 +169,10 @@ void MyGateway::parseAndSend(char *commandBuffer) {
|
||||
}
|
||||
} else {
|
||||
value = str;
|
||||
// Remove newline character
|
||||
value[strlen(value)-1] = 0;
|
||||
// Remove ending carriage return character (if it exists)
|
||||
uint8_t lastCharacter = strlen(value)-1;
|
||||
if (value[lastCharacter] == '\r')
|
||||
value[lastCharacter] = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user