Wait for initialization to complete before update relay status

That was crashing that method right after boot.

- Solves #28
This commit is contained in:
Edward Firmo
2024-12-20 02:08:49 +01:00
parent c62e7a689c
commit 59da9bcb96
4 changed files with 30 additions and 8 deletions

View File

@@ -761,7 +761,7 @@ script:
const uint8_t num_gangs = (sl_tx_model_gang->active_index().has_value()) ?
(sl_tx_model_gang->active_index().value() + 1) : 0;
if (num_gangs < 1 || num_gangs > 4) {
ESP_LOGE("hw_leds", "Invalid number of gangs: %" PRIu8, num_gangs);
ESP_LOGE("core_hw_leds", "Invalid number of gangs: %" PRIu8, num_gangs);
return;
}
light_28->set_internal(!is_model_us);