forked from xiaozhi/xiaozhi-esp32
reconstruct led control
This commit is contained in:
17
main/led/led.h
Normal file
17
main/led/led.h
Normal 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_
|
||||
Reference in New Issue
Block a user