From 33717489b504b77f3b44963b05c43cf5dc7eb696 Mon Sep 17 00:00:00 2001 From: Iliana Weller Date: Tue, 13 Feb 2018 06:15:13 -0800 Subject: [PATCH] Add public getter `is_active` --- src/Kaleidoscope/Syster.cpp | 4 ++++ src/Kaleidoscope/Syster.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/Kaleidoscope/Syster.cpp b/src/Kaleidoscope/Syster.cpp index 7c6ff5cb..396607c6 100644 --- a/src/Kaleidoscope/Syster.cpp +++ b/src/Kaleidoscope/Syster.cpp @@ -46,6 +46,10 @@ void Syster::reset(void) { is_active_ = false; } +bool Syster::is_active(void) { + return is_active_; +} + // --- hooks --- Key Syster::eventHandlerHook(Key mapped_key, byte row, byte col, uint8_t key_state) { if (!is_active_) { diff --git a/src/Kaleidoscope/Syster.h b/src/Kaleidoscope/Syster.h index 35d8f825..83605be9 100644 --- a/src/Kaleidoscope/Syster.h +++ b/src/Kaleidoscope/Syster.h @@ -40,6 +40,8 @@ class Syster : public KaleidoscopePlugin { void begin(void) final; static void reset(void); + bool is_active(void); + private: static char symbol_[SYSTER_MAX_SYMBOL_LENGTH + 1]; static uint8_t symbol_pos_;