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.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'StatusLED.cpp') diff --git a/StatusLED.cpp b/StatusLED.cpp index c3544a5..3013ddb 100644 --- a/StatusLED.cpp +++ b/StatusLED.cpp @@ -1,10 +1,32 @@ #include "StatusLED.h" -StatusLED::StatusLED() +namespace fs = std::filesystem; + +StatusLED::StatusLED(): m_mode{Mode::OK}, m_bpm{60} { } void StatusLED::addLED(const LED& led) { - m_leds.push_back(led); + if (fs::exists(led.green) && fs::exists(led.red)) { + m_leds.push_back(led); + } +} + +void StatusLED::setMode(Mode mode) +{ + m_mode = mode; +} + +void StatusLED::setBPM(int bpm) +{ + m_bpm = bpm; +} + +void StatusLED::initLED(const LED& led) +{ +} + +void StatusLED::updateLED(const LED& led) +{ } -- cgit v1.2.3