fix complete_task exit
This commit is contained in:
parent
2a34c37181
commit
77f60304f5
|
@ -186,7 +186,7 @@ static void complete_task(void* arg)
|
||||||
if (ESP_OK != rc) {
|
if (ESP_OK != rc) {
|
||||||
ESP_LOGE(TAG, "close OTA failed");
|
ESP_LOGE(TAG, "close OTA failed");
|
||||||
tud_dfu_finish_flashing(DFU_STATUS_ERR_PROG);
|
tud_dfu_finish_flashing(DFU_STATUS_ERR_PROG);
|
||||||
return;
|
vTaskDelete(NULL); // close task
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,16 +197,13 @@ static void complete_task(void* arg)
|
||||||
if (ESP_APP_DESC_MAGIC_WORD == ota_desc.magic_word) {
|
if (ESP_APP_DESC_MAGIC_WORD == ota_desc.magic_word) {
|
||||||
ESP_LOGI(TAG, "set boot to valid app");
|
ESP_LOGI(TAG, "set boot to valid app");
|
||||||
esp_ota_set_boot_partition(ota);
|
esp_ota_set_boot_partition(ota);
|
||||||
|
xTimerChangePeriod(blinky_tm, pdMS_TO_TICKS(BLINK_IDLE), 0);
|
||||||
|
tud_dfu_finish_flashing(DFU_STATUS_OK);
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGI(TAG, "no valid app");
|
ESP_LOGI(TAG, "no valid app");
|
||||||
tud_dfu_finish_flashing(DFU_STATUS_ERR_VERIFY);
|
tud_dfu_finish_flashing(DFU_STATUS_ERR_VERIFY);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// flashing op for manifest is complete without error
|
|
||||||
xTimerChangePeriod(blinky_tm, pdMS_TO_TICKS(BLINK_IDLE), 0);
|
|
||||||
tud_dfu_finish_flashing(DFU_STATUS_OK);
|
|
||||||
|
|
||||||
vTaskDelete(NULL); // close task
|
vTaskDelete(NULL); // close task
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue