automatically initialize new device with webui username and password
This commit is contained in:
parent
9e2efddfc9
commit
dae545a63e
|
@ -247,6 +247,14 @@ void eeprom_retrieve_init()
|
|||
#ifdef ENABLE_WEBUI
|
||||
ESPMega_FRAM.read(EEPROM_ADDRESS_WEBUI_USERNAME, (uint8_t *)WEBUI_USERNAME, 32);
|
||||
ESPMega_FRAM.read(EEPROM_ADDRESS_WEBUI_PASSWORD, (uint8_t *)WEBUI_PASSWORD, 32);
|
||||
if(strlen(WEBUI_USERNAME)==0) {
|
||||
strcpy(WEBUI_USERNAME,"admin");
|
||||
ESPMega_FRAM.write(EEPROM_ADDRESS_WEBUI_USERNAME, (uint8_t *)WEBUI_USERNAME, 32);
|
||||
}
|
||||
if(strlen(WEBUI_PASSWORD)==0) {
|
||||
strcpy(WEBUI_PASSWORD,"admin");
|
||||
ESPMega_FRAM.write(EEPROM_ADDRESS_WEBUI_PASSWORD, (uint8_t *)WEBUI_PASSWORD, 32);
|
||||
}
|
||||
#endif
|
||||
// EEPROM Data Retrival
|
||||
#ifdef ENABLE_CLIMATE_MODULE
|
||||
|
|
Loading…
Reference in New Issue