led_strip_control.h 504 B

123456789101112131415161718192021
  1. #ifndef LED_STRIP_CONTROL_H
  2. #define LED_STRIP_CONTROL_H
  3. #include "iot/thing.h"
  4. #include "led/circular_strip.h"
  5. using namespace iot;
  6. class LedStripControl : public Thing {
  7. private:
  8. CircularStrip* led_strip_;
  9. int brightness_level_; // 亮度等级 (0-8)
  10. int LevelToBrightness(int level) const; // 将等级转换为实际亮度值
  11. StripColor RGBToColor(int red, int green, int blue);
  12. public:
  13. explicit LedStripControl(CircularStrip* led_strip);
  14. };
  15. #endif // LED_STRIP_CONTROL_H