BREAKING CHANGE: Removed deprecated config parsing method

After this commit its not possible to migrate from the old binary blob config to the new json based config!! If you still running a old version before 12. October please upgrade to a version before this commit.
See https://github.com/tbnobody/OpenDTU/discussions/285
This commit is contained in:
Thomas Basler
2022-11-14 22:24:16 +01:00
parent 5f55414c0a
commit daf847e7b3
3 changed files with 6 additions and 153 deletions

View File

@@ -3,8 +3,7 @@
#include <Arduino.h>
#define CONFIG_FILENAME "/config.bin"
#define CONFIG_FILENAME_JSON "/config.json"
#define CONFIG_FILENAME "/config.json"
#define CONFIG_VERSION 0x00011600 // 0.1.22 // make sure to clean all after change
#define WIFI_MAX_SSID_STRLEN 31
@@ -15,7 +14,6 @@
#define NTP_MAX_TIMEZONE_STRLEN 50
#define NTP_MAX_TIMEZONEDESCR_STRLEN 50
#define MQTT_MAX_HOSTNAME_OLD_STRLEN 31
#define MQTT_MAX_HOSTNAME_STRLEN 128
#define MQTT_MAX_USERNAME_STRLEN 32
#define MQTT_MAX_PASSWORD_STRLEN 32
@@ -54,7 +52,6 @@ struct CONFIG_T {
char Ntp_TimezoneDescr[NTP_MAX_TIMEZONEDESCR_STRLEN + 1];
bool Mqtt_Enabled;
char Mqtt_Hostname_Short[MQTT_MAX_HOSTNAME_OLD_STRLEN + 1]; // Deprecated but for config compatibility
uint Mqtt_Port;
char Mqtt_Username[MQTT_MAX_USERNAME_STRLEN + 1];
char Mqtt_Password[MQTT_MAX_PASSWORD_STRLEN + 1];
@@ -94,9 +91,6 @@ public:
CONFIG_T& get();
INVERTER_CONFIG_T* getFreeInverterSlot();
private:
bool readJson();
};
extern ConfigurationClass Configuration;