Skip to content

Commit 468a802

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 5544364 + c5f85ef commit 468a802

File tree

6 files changed

+22
-5
lines changed

6 files changed

+22
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ All notable changes to this project will be documented in this file.
1515
- Changed the width of the confirm dialog.
1616
- SvelteKit bundling as single files to reduce heap consumption.
1717

18+
### Fixes
19+
20+
- [#109](https://github.com/theelims/ESP32-sveltekit/issues/109)
21+
1822
## [0.6.0] - 2025-11-03
1923

2024
> [!CAUTION]

lib/framework/EthernetSettingsService.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
#include <EthernetSettingsService.h>
1616

17+
#if FT_ENABLED(FT_ETHERNET)
18+
1719
EthernetSettingsService::EthernetSettingsService(PsychicHttpServer *server,
1820
FS *fs,
1921
SecurityManager *securityManager,
@@ -113,4 +115,6 @@ void EthernetSettingsService::updateEthernet()
113115
doc["connected"] = ETH.connected();
114116
JsonObject jsonObject = doc.as<JsonObject>();
115117
_socket->emitEvent(EVENT_ETHERNET, jsonObject);
116-
}
118+
}
119+
120+
#endif // end FT_ENABLED(FT_ETHERNET)

lib/framework/EthernetSettingsService.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838

3939
#define EVENT_ETHERNET "ethernet"
4040

41+
#if FT_ENABLED(FT_ETHERNET)
42+
4143
// Struct defining the ethernet settings
4244
typedef struct
4345
{
@@ -136,4 +138,5 @@ class EthernetSettingsService : public StatefulService<EthernetSettings>
136138
void updateEthernet();
137139
};
138140

141+
#endif // end FT_ENABLED(FT_ETHERNET)
139142
#endif // end EthernetSettingsService_h

lib/framework/EthernetStatus.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
#include <EthernetStatus.h>
1616

17+
#if FT_ENABLED(FT_ETHERNET)
18+
1719
EthernetStatus::EthernetStatus(PsychicHttpServer *server,
1820
SecurityManager *securityManager) : _server(server),
1921
_securityManager(securityManager)
@@ -91,3 +93,5 @@ bool EthernetStatus::isConnected()
9193
{
9294
return ETH.connected();
9395
}
96+
97+
#endif // end FT_ENABLED(FT_ETHERNET)

lib/framework/EthernetStatus.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
#define ETHERNET_STATUS_SERVICE_PATH "/rest/ethernetStatus"
2727

28+
#if FT_ENABLED(FT_ETHERNET)
29+
2830
class EthernetStatus
2931
{
3032
public:
@@ -46,4 +48,6 @@ class EthernetStatus
4648
esp_err_t ethernetStatus(PsychicRequest *request);
4749
};
4850

51+
#endif // end FT_ENABLED(FT_ETHERNET)
52+
4953
#endif // end EthernetStatus_h

lib/framework/WiFiSettingsService.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,7 @@ void WiFiSettingsService::manageSTA()
311311
{
312312
return;
313313
}
314-
315-
// Connect or reconnect as required
316-
if ((WiFi.getMode() & WIFI_STA) == 0) // 🌙 , see https://github.com/theelims/ESP32-sveltekit/issues/109 🚧
314+
else
317315
{
318316
#ifdef SERIAL_INFO
319317
Serial.println("Connecting to WiFi...");
@@ -490,7 +488,7 @@ void WiFiSettingsService::updateRSSI()
490488

491489
void WiFiSettingsService::onStationModeDisconnected(WiFiEvent_t event, WiFiEventInfo_t info)
492490
{
493-
WiFi.disconnect(true);
491+
manageSTA();
494492
}
495493

496494
void WiFiSettingsService::onStationModeStop(WiFiEvent_t event, WiFiEventInfo_t info)

0 commit comments

Comments
 (0)