mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-07-06 02:24:30 +02:00
Improve Power State Update Task timing
This commit is contained in:
@ -14,8 +14,11 @@ SemaphoreHandle_t PowerManager::powerMutex = NULL;
|
||||
void vTaskUpdatePowerState(void *pvParameters) {
|
||||
for (;;) {
|
||||
ESP_LOGV(TAG, "Updating Power State...");
|
||||
TickType_t executionStart = xTaskGetTickCount();
|
||||
PowerManager::updatePowerStateHandler();
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
vTaskDelayUntil(
|
||||
&executionStart,
|
||||
pdMS_TO_TICKS(PowerParameters::POWER_STATE_UPDATE_INTERVAL_MS));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user