Merge pull request #1236 from keyboardio/b/focus/char-read-fix

FocusSerial: Use `.readBytes()` rather than `.read()` for reading a `char`
pull/1241/head
Gergely Nagy 2 years ago committed by GitHub
commit 96fbfb0628
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -95,7 +95,7 @@ class FocusSerial : public kaleidoscope::Plugin {
color.b = Runtime.serialPort().parseInt();
}
void read(char &c) {
c = static_cast<char>(Runtime.serialPort().read());
Runtime.serialPort().readBytes(&c, 1);
}
void read(uint8_t &u8) {
u8 = Runtime.serialPort().parseInt();

Loading…
Cancel
Save