Need to load struct items separately.
Byte array can't be assigned directly.
This commit is contained in:
parent
05280526b0
commit
288c7dfc80
2
eeprom_setup/.gitignore
vendored
2
eeprom_setup/.gitignore
vendored
@ -1 +1 @@
|
||||
config.h
|
||||
config.h
|
||||
|
@ -32,14 +32,14 @@ void StoreEEPROM() {
|
||||
strcpy(mqtt_data.password, MQTT_PASSWORD);
|
||||
mqtt_data.topic = mqtt_topics;
|
||||
|
||||
|
||||
ConfigData conf {
|
||||
mqtt_data,
|
||||
UpdateInterval,
|
||||
PeriodPWM,
|
||||
ThreshPWR,
|
||||
Hysteresis
|
||||
};
|
||||
ConfigData conf;
|
||||
conf.mqtt = mqtt_data;
|
||||
memcpy(conf.mac, mac, sizeof(mac[0])*6);
|
||||
conf.ip = ip;
|
||||
conf.interval = UpdateInterval;
|
||||
conf.period = PeriodPWM;
|
||||
conf.threshold = ThreshPWR;
|
||||
conf.hysteresis = Hysteresis;
|
||||
|
||||
EEPROM.put(ConfAddress, conf);
|
||||
Serial.println(conf.mqtt.broker);
|
||||
|
Loading…
Reference in New Issue
Block a user