Added c6 support

This commit is contained in:
cjkas 2026-03-29 21:53:57 +02:00
parent aa81b95bee
commit 72bfd26443
15 changed files with 143 additions and 54 deletions

View file

@ -13,7 +13,7 @@
#include "Web.h"
#include "MQTT.h"
#include "GitOTA.h"
#include "Network.h"
#include "ESPNetwork.h"
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <AsyncJson.h>
@ -25,7 +25,7 @@ extern SomfyShadeController somfy;
extern Web webServer;
extern MQTTClass mqtt;
extern GitUpdater git;
extern Network net;
extern ESPNetwork net;
//#define WEB_MAX_RESPONSE 34768
#define WEB_MAX_RESPONSE 4096
@ -2222,8 +2222,10 @@ void Web::begin() {
JsonObject objEth = obj["ethernet"];
if(settings.connType == conn_types_t::ethernet || settings.connType == conn_types_t::ethernetpref)
reboot = true;
#ifndef CONFIG_IDF_TARGET_ESP32C6
settings.Ethernet.fromJSON(objEth);
settings.Ethernet.save();
#endif
}
if(reboot) {
ESP_LOGI(TAG, "Rebooting ESP for new Network settings...");
@ -2304,7 +2306,9 @@ void Web::begin() {
settings.toJSON(obj);
obj["fwVersion"] = settings.fwVersion.name;
JsonObject eth = obj.createNestedObject("ethernet");
#ifndef CONFIG_IDF_TARGET_ESP32C6
settings.Ethernet.toJSON(eth);
#endif
JsonObject wifi = obj.createNestedObject("wifi");
settings.WIFI.toJSON(wifi);
JsonObject ip = obj.createNestedObject("ip");