Implemented first readonly version of ntp settings

This commit is contained in:
Thomas Basler
2022-04-17 23:13:36 +02:00
parent 821b9b16d1
commit 1f692f241f
8 changed files with 107 additions and 2 deletions

View File

@@ -3,12 +3,15 @@
#include <Arduino.h>
#define CONFIG_FILENAME "/config.bin"
#define CONFIG_VERSION 0x00010000 // 0.1.0
#define CONFIG_VERSION 0x00010400 // 0.1.4 // make sure to clean all after change
#define WIFI_MAX_SSID_STRLEN 31
#define WIFI_MAX_PASSWORD_STRLEN 31
#define WIFI_MAX_HOSTNAME_STRLEN 31
#define NTP_MAX_SERVER_STRLEN 31
#define NTP_MAX_TIMEZONE_STRLEN 50
struct CONFIG_T {
uint32_t Cfg_Version;
uint Cfg_SaveCount;
@@ -22,6 +25,9 @@ struct CONFIG_T {
byte WiFi_Dns2[4];
bool WiFi_Dhcp;
char WiFi_Hostname[WIFI_MAX_HOSTNAME_STRLEN + 1];
char Ntp_Server[NTP_MAX_SERVER_STRLEN + 1];
char Ntp_Timezone[NTP_MAX_TIMEZONE_STRLEN + 1];
};
class ConfigurationClass {