reconstruct led control

This commit is contained in:
Terrence
2025-01-05 19:34:28 +08:00
parent 495b949d77
commit c7c5b74d37
28 changed files with 586 additions and 386 deletions

17
main/led/led.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef _LED_H_
#define _LED_H_
class Led {
public:
virtual ~Led() = default;
// Set the led state based on the device state
virtual void OnStateChanged() = 0;
};
class NoLed : public Led {
public:
virtual void OnStateChanged() override {}
};
#endif // _LED_H_