mirror of
https://github.com/esphome/esphome.git
synced 2026-09-18 18:48:39 +00:00
[wifi] Wake main loop when requesting high performance mode (#16598)
This commit is contained in:
@@ -2193,7 +2193,15 @@ bool WiFiComponent::request_high_performance() {
|
||||
}
|
||||
|
||||
// Give the semaphore (non-blocking). This increments the count.
|
||||
return xSemaphoreGive(this->high_performance_semaphore_) == pdTRUE;
|
||||
bool success = xSemaphoreGive(this->high_performance_semaphore_) == pdTRUE;
|
||||
|
||||
// Wake the main loop so the switch to high-performance mode is applied on the
|
||||
// next tick instead of waiting up to loop_interval.
|
||||
if (success) {
|
||||
App.wake_loop_threadsafe();
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool WiFiComponent::release_high_performance() {
|
||||
|
||||
Reference in New Issue
Block a user