mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2026-03-28 20:17:11 +01:00
Adjust config
* Allow wifi passwords length of 64 chars * Added max channel power
This commit is contained in:
@@ -37,6 +37,9 @@ void ConfigurationClass::init()
|
||||
for (uint8_t i = 0; i < INV_MAX_COUNT; i++) {
|
||||
config.Inverter[i].Serial = 0;
|
||||
strlcpy(config.Inverter[i].Name, "", 0);
|
||||
for (uint8_t c = 0; c < INV_MAX_CHAN_COUNT; c++) {
|
||||
config.Inverter[0].MaxChannelPower[c] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
config.Dtu_Serial = DTU_SERIAL;
|
||||
@@ -117,6 +120,10 @@ void ConfigurationClass::migrate()
|
||||
config.Mqtt_PublishInterval = MQTT_PUBLISH_INTERVAL;
|
||||
}
|
||||
|
||||
if (config.Cfg_Version < 0x00011100) {
|
||||
init(); // Config will be completly incompatible after this update
|
||||
}
|
||||
|
||||
config.Cfg_Version = CONFIG_VERSION;
|
||||
write();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user