From ef578ac72a70bfbe8aee726d43374c841d77ade4 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Mon, 20 Jan 2025 16:32:33 +0100 Subject: Detect MIDI port --- StatusLED.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'StatusLED.h') 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 m_leds; // on best effort base, those will all show the same status Mode m_mode; + int m_bpm; }; -- cgit v1.2.3