Feature implementation

- #2236
  - #1984
Better PSRAM handling
platformio.ini update
On/Off bus handling
This commit is contained in:
Blaz Kristan
2023-05-28 22:50:19 +02:00
parent 7d84de6690
commit 5a8a8dc292
20 changed files with 2302 additions and 2240 deletions

View File

@@ -152,16 +152,13 @@ int getSignalQuality(int rssi)
//handle Ethernet connection event
void WiFiEvent(WiFiEvent_t event)
{
#ifdef WLED_USE_ETHERNET
char hostname[25];
#endif
switch (event) {
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_ETHERNET)
case SYSTEM_EVENT_ETH_START:
DEBUG_PRINTLN(F("ETH Started"));
break;
case SYSTEM_EVENT_ETH_CONNECTED:
{
DEBUG_PRINTLN(F("ETH Connected"));
if (!apActive) {
WiFi.disconnect(true);
@@ -172,10 +169,12 @@ void WiFiEvent(WiFiEvent_t event)
ETH.config(INADDR_NONE, INADDR_NONE, INADDR_NONE);
}
// convert the "serverDescription" into a valid DNS hostname (alphanumeric)
char hostname[64];
prepareHostname(hostname);
ETH.setHostname(hostname);
showWelcomePage = false;
break;
}
case SYSTEM_EVENT_ETH_DISCONNECTED:
DEBUG_PRINTLN(F("ETH Disconnected"));
// This doesn't really affect ethernet per se,