Fix vTaskDelay syntax error
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include "esp_task_wdt.h"
|
||||
#include "wifi.hpp"
|
||||
|
||||
#define WATCHDOG_KEEPALIVE_TICKS pdMS_TO_TICKS(8000)
|
||||
#define WATCHDOG_KEEPALIVE_MS 8000
|
||||
|
||||
extern EventGroupHandle_t connectivity_event_group;
|
||||
extern EventBits_t bits = xEventGroupGetBits(connectivity_event_group);
|
||||
@@ -27,8 +27,6 @@ static void watchdogTask(void *pvParameters) {
|
||||
|
||||
ESP_ERROR_CHECK(esp_task_wdt_add(NULL));
|
||||
|
||||
const TickType_t keepAlivePeriod = pdMS_TO_TICKS(WATCHDOG_KEEPALIVE_TICKS);
|
||||
|
||||
for(;;) {
|
||||
if (criticalErrorFlag) {
|
||||
ESP_LOGE(TAG, "Critical error flag raised. Rebooting.");
|
||||
@@ -38,7 +36,7 @@ static void watchdogTask(void *pvParameters) {
|
||||
ESP_ERROR_CHECK(esp_task_wdt_reset());
|
||||
ESP_LOGV(TAG, "WDT reset");
|
||||
|
||||
vTaskDelay(keepAlivePeriod);
|
||||
vTaskDelay(pdMS_TO_TICKS(WATCHDOG_KEEPALIVE_MS));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user