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);
|
strcpy(mqtt_data.password, MQTT_PASSWORD);
|
||||||
mqtt_data.topic = mqtt_topics;
|
mqtt_data.topic = mqtt_topics;
|
||||||
|
|
||||||
|
ConfigData conf;
|
||||||
ConfigData conf {
|
conf.mqtt = mqtt_data;
|
||||||
mqtt_data,
|
memcpy(conf.mac, mac, sizeof(mac[0])*6);
|
||||||
UpdateInterval,
|
conf.ip = ip;
|
||||||
PeriodPWM,
|
conf.interval = UpdateInterval;
|
||||||
ThreshPWR,
|
conf.period = PeriodPWM;
|
||||||
Hysteresis
|
conf.threshold = ThreshPWR;
|
||||||
};
|
conf.hysteresis = Hysteresis;
|
||||||
|
|
||||||
EEPROM.put(ConfAddress, conf);
|
EEPROM.put(ConfAddress, conf);
|
||||||
Serial.println(conf.mqtt.broker);
|
Serial.println(conf.mqtt.broker);
|
||||||
|
Loading…
Reference in New Issue
Block a user