configmanager.cpp: bugfix version compare

This commit is contained in:
cyberman54 2021-03-06 21:26:35 +01:00
parent 74bc84b0e1
commit ad3567df45

View File

@ -129,7 +129,8 @@ bool loadConfig() {
switch (version_compare(PROGVERSION, cfg.version)) { switch (version_compare(PROGVERSION, cfg.version)) {
case -1: // device configuration belongs to newer than current firmware case -1: // device configuration belongs to newer than current firmware
ESP_LOGE(TAG, "Incompatible device configuration"); ESP_LOGE(TAG, "Incompatible device configuration");
return false; eraseConfig();
return true;
case 1: // device configuration belongs to older than current firmware case 1: // device configuration belongs to older than current firmware
ESP_LOGW(TAG, "Device was updated, attempt to migrate configuration"); ESP_LOGW(TAG, "Device was updated, attempt to migrate configuration");
migrateConfig(); migrateConfig();