Skip to content

Commit

Permalink
Fixes for boot loop issue with Arduino 6.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
theelims committed Sep 11, 2023
1 parent cc368b4 commit bca085c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## [0.2.1] - 2023-09-11

### Fixed

- Fixed the boot loop issue for Arduino 6.4.0

## [0.2.0] - 2023-08-03

### Added
Expand Down
2 changes: 1 addition & 1 deletion factory_settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[factory_settings]
build_flags =
; Global Settings
-D FIRMWARE_VERSION=\"0.2.0\"
-D FIRMWARE_VERSION=\"0.2.1\"

; WiFi settings
-D FACTORY_WIFI_SSID=\"\"
Expand Down
14 changes: 7 additions & 7 deletions lib/framework/WiFiSettingsService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ WiFiSettingsService::WiFiSettingsService(AsyncWebServer *server, FS *fs, Securit
_fsPersistence(WiFiSettings::read, WiFiSettings::update, this, fs, WIFI_SETTINGS_FILE),
_lastConnectionAttempt(0),
_notificationEvents(notificationEvents)
{
addUpdateHandler([&](const String &originId)
{ reconfigureWiFiConnection(); },
false);
}

void WiFiSettingsService::begin()
{
// We want the device to come up in opmode=0 (WIFI_OFF), when erasing the flash this is not the default.
// If needed, we save opmode=0 before disabling persistence so the device boots with WiFi disabled in the future.
Expand All @@ -39,13 +46,6 @@ WiFiSettingsService::WiFiSettingsService(AsyncWebServer *server, FS *fs, Securit
WiFi.onEvent(std::bind(&WiFiSettingsService::onStationModeStop, this, std::placeholders::_1, std::placeholders::_2),
WiFiEvent_t::ARDUINO_EVENT_WIFI_STA_STOP);

addUpdateHandler([&](const String &originId)
{ reconfigureWiFiConnection(); },
false);
}

void WiFiSettingsService::begin()
{
_fsPersistence.readFromFS();
reconfigureWiFiConnection();
}
Expand Down
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ default_envs = esp32-s3-devkitc-1

[env]
framework = arduino
platform = espressif32 @ 6.3.2
platform = espressif32
build_flags =
${factory_settings.build_flags}
${features.build_flags}
Expand Down

0 comments on commit bca085c

Please sign in to comment.