#pragma once #include #include struct LED { // the root to the whole LED interface, e.g. "/sys/class/leds/ACT" std::filesystem::path green; std::filesystem::path red; }; class StatusLED { public: enum class Mode { 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; };