add restart reason: OTA completed

This commit is contained in:
technyon
2023-02-11 11:11:11 +01:00
parent 812bbf384b
commit e4ae869d78
2 changed files with 9 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
#include <Arduino.h>
#include "Ota.h"
#include "Logger.h"
#include "RestartReason.h"
#define FULL_PACKET 1436 // HTTP_UPLOAD_BUFLEN in WebServer,h
@@ -26,7 +27,7 @@ void Ota::updateFirmware(uint8_t* buf, size_t size)
if (ESP_OK == esp_ota_set_boot_partition(esp_ota_get_next_update_partition(NULL)))
{
delay(2000);
esp_restart();
restartEsp(RestartReason::OTACompleted);
}
else
{