Adjust config

* Allow wifi  passwords length of 64 chars
* Added max channel power
This commit is contained in:
Thomas Basler
2022-06-22 21:00:44 +02:00
parent 70b9f9fdba
commit 10974ade3e
2 changed files with 12 additions and 4 deletions

View File

@@ -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();
}