Browse Source

Fix static IP EEPROM save

bme680
Mathieu Maret 2 years ago
parent
commit
ac6ab8969c
  1. 3
      WifiControlSensor/EEPROM.h
  2. 10
      WifiControlSensor/EEPROM.ino

3
WifiControlSensor/EEPROM.h

@ -15,7 +15,7 @@ typedef struct productConfig_t {
uint32_t mask;
uint32_t dns;
uint32_t dns2;
int32_t channel;
uint8_t channel;
char *bssid;
} productConfig;
@ -23,4 +23,3 @@ typedef struct productConfig_t {
int EepromSaveConfig(productConfig &config);
int EepromSaveBootMode(uint8_t bootMode);
void EepromReadConfig(productConfig &config);

10
WifiControlSensor/EEPROM.ino

@ -87,15 +87,15 @@ void EepromReadConfig(productConfig &config) {
readConfElement(&tmpString, i);
config.ip_mode = atoi(tmpString);
readConfElement(&tmpString, i);
config.ip = atoi(tmpString);
config.ip = atoll(tmpString);
readConfElement(&tmpString, i);
config.gw = atoi(tmpString);
config.gw = atoll(tmpString);
readConfElement(&tmpString, i);
config.mask = atoi(tmpString);
config.mask = atoll(tmpString);
readConfElement(&tmpString, i);
config.dns = atoi(tmpString);
config.dns = atoll(tmpString);
readConfElement(&tmpString, i);
config.dns2 = atoi(tmpString);
config.dns2 = atoll(tmpString);
readConfElement(&tmpString, i);
config.channel = atoi(tmpString);
readConfElement(&config.bssid, i);

Loading…
Cancel
Save