More adjustments for auto update

This commit is contained in:
Gunnar Skjold
2024-12-07 11:32:45 +01:00
parent 18af98511a
commit 9da2d0760e
6 changed files with 217 additions and 79 deletions

View File

@@ -20,7 +20,6 @@ ADC_MODE(ADC_VCC);
#include <WiFi.h>
#include <ESPmDNS.h>
#include <ESP32SSDP.h>
#include "Update.h"
#include <esp_task_wdt.h>
#include <lwip/dns.h>
#if defined(CONFIG_IDF_TARGET_ESP32C3)
@@ -427,10 +426,12 @@ void setup() {
if(!hw.ledOn(LED_GREEN)) {
hw.ledOn(LED_INTERNAL);
}
#if defined(ESP32)
if(updater.relocateOrRepartitionIfNecessary()) {
ESP.restart();
return;
}
#endif
hw.ledOff(LED_GREEN);
hw.ledOff(LED_INTERNAL);