Fixed crash due to uninitialized variable (#116)

* Fixed crash due to uninitialized variable "Fatal exception 9(LoadStoreAlignmentCause)"
This commit is contained in:
kasedy 2020-05-20 10:51:04 -07:00 committed by GitHub
parent a59f32c420
commit 4e6823ceec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -7,7 +7,9 @@ APSettingsService::APSettingsService(AsyncWebServer* server, FS* fs, SecurityMan
server,
AP_SETTINGS_SERVICE_PATH,
securityManager),
_fsPersistence(APSettings::serialize, APSettings::deserialize, this, fs, AP_SETTINGS_FILE) {
_fsPersistence(APSettings::serialize, APSettings::deserialize, this, fs, AP_SETTINGS_FILE),
_lastManaged(0),
_dnsServer(nullptr) {
addUpdateHandler([&](String originId) { reconfigureAP(); }, false);
}

View File

@ -7,7 +7,8 @@ OTASettingsService::OTASettingsService(AsyncWebServer* server, FS* fs, SecurityM
server,
OTA_SETTINGS_SERVICE_PATH,
securityManager),
_fsPersistence(OTASettings::serialize, OTASettings::deserialize, this, fs, OTA_SETTINGS_FILE) {
_fsPersistence(OTASettings::serialize, OTASettings::deserialize, this, fs, OTA_SETTINGS_FILE),
_arduinoOTA(nullptr) {
#ifdef ESP32
WiFi.onEvent(std::bind(&OTASettingsService::onStationModeGotIP, this, std::placeholders::_1, std::placeholders::_2),
WiFiEvent_t::SYSTEM_EVENT_STA_GOT_IP);