Use a constant to make code clearer

Signed-off-by: Jesse Vincent <jesse@keyboard.io>
pull/1105/head
Jesse Vincent 3 years ago
parent aa34c150d2
commit 34e630438b
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

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

Loading…
Cancel
Save