From 3ddd12ea040d3d6778ae070709d729de5ab84bd3 Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Tue, 6 Apr 2021 18:59:50 -0500 Subject: [PATCH] Adapt FocusSerial plugin to KeyEvent handlers Signed-off-by: Michael Richters --- .../src/kaleidoscope/plugin/FocusSerial.cpp | 2 +- .../src/kaleidoscope/plugin/FocusSerial.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.cpp b/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.cpp index de97e2be..abd7ee6e 100644 --- a/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.cpp +++ b/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.cpp @@ -32,7 +32,7 @@ void FocusSerial::drain(void) { Runtime.serialPort().read(); } -EventHandlerResult FocusSerial::beforeReportingState() { +EventHandlerResult FocusSerial::afterEachCycle() { if (Runtime.serialPort().available() == 0) return EventHandlerResult::OK; diff --git a/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.h b/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.h index 944c42a0..0c39937b 100644 --- a/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.h +++ b/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.h @@ -91,7 +91,7 @@ class FocusSerial : public kaleidoscope::Plugin { static constexpr char NEWLINE = '\n'; /* Hooks */ - EventHandlerResult beforeReportingState(); + EventHandlerResult afterEachCycle(); EventHandlerResult onFocusEvent(const char *command); private: