|
|
@ -40,11 +40,11 @@ EventHandlerResult FocusSerial::afterEachCycle() {
|
|
|
|
} while (command_[i - 1] != SEPARATOR
|
|
|
|
} while (command_[i - 1] != SEPARATOR
|
|
|
|
&& i < sizeof(command_)
|
|
|
|
&& i < sizeof(command_)
|
|
|
|
&& Runtime.serialPort().available()
|
|
|
|
&& Runtime.serialPort().available()
|
|
|
|
&& (Runtime.serialPort().peek() != NEWLINE ));
|
|
|
|
&& (Runtime.serialPort().peek() != NEWLINE));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// If this was a command with a space-delimited payload, strip the space delimiter off
|
|
|
|
// If this was a command with a space-delimited payload, strip the space delimiter off
|
|
|
|
if (command_[i - 1] == SEPARATOR )
|
|
|
|
if (command_[i - 1] == SEPARATOR)
|
|
|
|
command_[i - 1] = '\0';
|
|
|
|
command_[i - 1] = '\0';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|