mirror of
https://github.com/esphome/esphome.git
synced 2026-09-16 01:28:39 +00:00
expand all sites, part 6
This commit is contained in:
@@ -162,7 +162,8 @@ void ESP32RMTLEDStripLightOutput::set_led_params(uint32_t bit0_high, uint32_t bi
|
||||
void ESP32RMTLEDStripLightOutput::write_state(light::LightState *state) {
|
||||
// protect from refreshing too often
|
||||
uint32_t now = micros();
|
||||
if (auto rate = this->max_refresh_rate_.value_or(0); rate != 0 && (now - this->last_refresh_) < rate) {
|
||||
auto rate = this->max_refresh_rate_.value_or(0);
|
||||
if (rate != 0 && (now - this->last_refresh_) < rate) {
|
||||
// try again next loop iteration, so that this change won't get lost
|
||||
this->schedule_show();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user