minor: fix debug messages
This commit is contained in:
parent
5c0e27b9e2
commit
2a34c37181
|
@ -111,6 +111,7 @@ static void dl_task(void* arg)
|
|||
if (0 == dl_method) { // using OTA tools
|
||||
// get handle for OTA update
|
||||
if (0 == ota_handle) {
|
||||
ESP_LOGD(TAG, "init OTA flash");
|
||||
rc = esp_ota_begin(ota_part, OTA_SIZE_UNKNOWN, &ota_handle);
|
||||
if (ESP_OK != rc) {
|
||||
ESP_LOGE(TAG, "init OTA failed");
|
||||
|
@ -177,6 +178,7 @@ static void dl_task(void* arg)
|
|||
static void complete_task(void* arg)
|
||||
{
|
||||
esp_err_t rc;
|
||||
|
||||
// finish flashing
|
||||
if (ota_handle) {
|
||||
rc = esp_ota_end(ota_handle);
|
||||
|
@ -215,12 +217,13 @@ static void complete_task(void* arg)
|
|||
int main(void)
|
||||
{
|
||||
board_init();
|
||||
|
||||
const esp_partition_t *next = esp_ota_get_next_update_partition(NULL);
|
||||
esp_app_desc_t next_desc;
|
||||
esp_ota_get_partition_description(next, &next_desc);
|
||||
|
||||
if (ESP_APP_DESC_MAGIC_WORD == next_desc.magic_word) {
|
||||
ESP_LOGI(TAG, "boot set to valid app");
|
||||
ESP_LOGI(TAG, "set app for next boot");
|
||||
esp_ota_set_boot_partition(next);
|
||||
} else {
|
||||
ESP_LOGI(TAG, "no valid app");
|
||||
|
|
Loading…
Reference in New Issue