Adapt FocusSerial plugin to KeyEvent handlers

Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
pull/1024/head
Michael Richters 4 years ago
parent 1ff9bb81c2
commit 3ddd12ea04
No known key found for this signature in database
GPG Key ID: 1288FD13E4EEF0C0

@ -32,7 +32,7 @@ void FocusSerial::drain(void) {
Runtime.serialPort().read(); Runtime.serialPort().read();
} }
EventHandlerResult FocusSerial::beforeReportingState() { EventHandlerResult FocusSerial::afterEachCycle() {
if (Runtime.serialPort().available() == 0) if (Runtime.serialPort().available() == 0)
return EventHandlerResult::OK; return EventHandlerResult::OK;

@ -91,7 +91,7 @@ class FocusSerial : public kaleidoscope::Plugin {
static constexpr char NEWLINE = '\n'; static constexpr char NEWLINE = '\n';
/* Hooks */ /* Hooks */
EventHandlerResult beforeReportingState(); EventHandlerResult afterEachCycle();
EventHandlerResult onFocusEvent(const char *command); EventHandlerResult onFocusEvent(const char *command);
private: private:

Loading…
Cancel
Save