mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-21 09:13:42 +00:00
Don't malloc wdt_config
This commit is contained in:
parent
30043d5622
commit
0645c44006
@ -164,10 +164,11 @@ void esp32Setup()
|
||||
// #define APP_WATCHDOG_SECS 45
|
||||
#define APP_WATCHDOG_SECS 90
|
||||
|
||||
esp_task_wdt_config_t *wdt_config = (esp_task_wdt_config_t *)malloc(sizeof(esp_task_wdt_config_t));
|
||||
wdt_config->timeout_ms = APP_WATCHDOG_SECS * 1000;
|
||||
wdt_config->trigger_panic = true;
|
||||
res = esp_task_wdt_init(wdt_config);
|
||||
esp_task_wdt_config_t wdt_config = {
|
||||
.timeout_ms = APP_WATCHDOG_SECS * 1000,
|
||||
.trigger_panic = true,
|
||||
};
|
||||
res = esp_task_wdt_init(&wdt_config);
|
||||
assert(res == ESP_OK);
|
||||
|
||||
res = esp_task_wdt_add(NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user