Touch events & rotary events to host
This commit is contained in:
@@ -5,7 +5,12 @@
|
||||
|
||||
struct EffectStaticConfig
|
||||
{
|
||||
EffectStaticConfig(const ColorRGBW &c = ColorRGBW{0, 0, 0, 0}, uint16_t beg = 0, uint16_t en = 0)
|
||||
: color(c), begin(beg), end(en) {}
|
||||
|
||||
ColorRGBW color;
|
||||
uint16_t begin = 0;
|
||||
uint16_t end = 0;
|
||||
};
|
||||
|
||||
template <typename TLedStrip>
|
||||
@@ -22,7 +27,11 @@ public:
|
||||
|
||||
int operator()()
|
||||
{
|
||||
setLedRGBW(ledStrip_, 0, NUM_LEDS, config_.color);
|
||||
if (config_.begin == config_.end)
|
||||
setLedRGBW(ledStrip_, 0, NUM_LEDS, config_.color);
|
||||
else
|
||||
setLedRGBW(ledStrip_, config_.begin, config_.end, config_.color);
|
||||
|
||||
return 10000; // nothing changing, return some large time to sleep
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user