diff options
Diffstat (limited to 'StatusLED.h')
-rw-r--r-- | StatusLED.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/StatusLED.h b/StatusLED.h index 39b19f5..b1c0f23 100644 --- a/StatusLED.h +++ b/StatusLED.h @@ -5,6 +5,7 @@ struct LED { + // the root to the whole LED interface, e.g. "/sys/class/leds/ACT" std::filesystem::path green; std::filesystem::path red; }; @@ -14,15 +15,23 @@ class StatusLED public: enum class Mode { - OK, // green - Error // red + OK, // green + OKBeat, // green with heartbeat + Error, // red }; StatusLED(); void addLED(const LED& led); + void setMode(Mode mode); + void setBPM(int bpm); + private: + void initLED(const LED& led); + void updateLED(const LED& led); + std::vector<LED> m_leds; // on best effort base, those will all show the same status Mode m_mode; + int m_bpm; }; |