feat: merge master Ethernet support into dev

Adapt W5500 to the native network event queue and select STA or ETH from NetworkSettings. Preserve the existing dev network settings and add a separate C6 Ethernet build without BLE to fit the OTA slot.

Validate with S3 and C6 Ethernet firmware builds, the shared LittleFS image, binary layout checks and targeted network transition checks.
This commit is contained in:
Yurii committed 2026-11-23 21:06:26 +03:00
commit 4e71915222
21 files changed
+1007 -158

No files matched your search

+38
View File
@@ -97,6 +97,44 @@ const convertLegacyBackup = (data) => {
const result = convert(data);
const network = result?.network;
if (network !== null && typeof network === 'object' && !Array.isArray(network)) {
const hasLegacyAp = Object.prototype.hasOwnProperty.call(network, 'ap');
const hasLegacySta = Object.prototype.hasOwnProperty.call(network, 'sta');
if (hasLegacyAp || hasLegacySta) {
const wifi = network.wifi !== null && typeof network.wifi === 'object' && !Array.isArray(network.wifi)
? network.wifi : Object.create(null);
if (hasLegacyAp && !Object.prototype.hasOwnProperty.call(wifi, 'ap')) {
wifi.ap = network.ap;
}
if (hasLegacySta && !Object.prototype.hasOwnProperty.call(wifi, 'sta')) {
wifi.sta = network.sta;
}
network.wifi = wifi;
delete network.ap;
delete network.sta;
}
if (!Object.prototype.hasOwnProperty.call(network, 'type')) {
if (typeof network.ethernet?.enabled === 'boolean') {
network.type = network.ethernet.enabled ? 3 : 2;
} else if (hasLegacyAp || hasLegacySta) {
network.type = 2;
}
}
if (network.ethernet !== null && typeof network.ethernet === 'object' && !Array.isArray(network.ethernet)) {
if (Object.prototype.hasOwnProperty.call(network.ethernet, 'pins')
&& !Object.prototype.hasOwnProperty.call(network.ethernet, 'gpio')) {
network.ethernet.gpio = network.ethernet.pins;
}
delete network.ethernet.pins;
delete network.ethernet.enabled;
}
}
const opentherm = result?.settings?.opentherm;
if (opentherm !== null && typeof opentherm === 'object') {
delete opentherm.unit_system;