Add WiFi network scan RPC command to Improv Serial (#3271)

This commit is contained in:
Christian Schwinne
2023-06-27 01:51:44 +02:00
committed by Frank
parent a26ff4ccbd
commit d3f3f6330b
4 changed files with 124 additions and 77 deletions

View File

@@ -109,6 +109,7 @@ void WLED::loop()
handleRemote();
#endif
handleSerial();
handleImprovWifiScan();
#if defined(ARDUINO_ARCH_ESP32) && defined(WLEDMM_PROTECT_SERVICE) // WLEDMM experimental: handleNotifications() calls strip.show(); handleTransitions modifies segments
if (!suspendStripService) {
@@ -962,7 +963,6 @@ void WLED::initConnection()
ws.onEvent(wsEvent);
#endif
WiFi.disconnect(true); // close old connections
#ifdef ESP8266
WiFi.setPhyMode(WIFI_PHY_MODE_11N);
@@ -1228,7 +1228,7 @@ void WLED::handleConnection()
if (improvActive) {
if (improvError == 3) sendImprovStateResponse(0x00, true);
sendImprovStateResponse(0x04);
if (improvActive > 1) sendImprovRPCResponse(0x01);
if (improvActive > 1) sendImprovIPRPCResult(ImprovRPCType::Command_Wifi);
}
initInterfaces();
userConnected();