diff --git a/src/app.cpp b/src/app.cpp index f30ed4db..0df468e3 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -65,7 +65,7 @@ void app::setup() { #if defined(ESP32) mHmsPayload.setup(this, &mSys, &mCmtRadio, &mStat, 5, &mTimestamp); mHmsPayload.enableSerialDebug(mConfig->serial.debug); - mHmsPayload.addPayloadListener(std::bind(&app::payloadEventListener, this, std::placeholders::_1)); + mHmsPayload.addPayloadListener(std::bind(&app::payloadEventListener, this, std::placeholders::_1, std::placeholders::_2)); #endif /*DBGPRINTLN("--- after payload"); DBGPRINTLN(String(ESP.getFreeHeap())); diff --git a/src/wifi/ahoywifi.cpp b/src/wifi/ahoywifi.cpp index 91c8b8d2..6def5282 100644 --- a/src/wifi/ahoywifi.cpp +++ b/src/wifi/ahoywifi.cpp @@ -104,15 +104,18 @@ void ahoywifi::tickWifiLoop() { DBGPRINTLN(String(mConfig->sys.stationSsid)); mScanCnt = 0; mScanActive = true; - uint8_t *ssid = ([this] () { + #if defined(ESP8266) + WiFi.scanNetworks(true, true, 0U, ([this] () { if(mConfig->sys.isHidden) return (uint8_t *)NULL; return (uint8_t *)(mConfig->sys.stationSsid); - })(); - #if defined(ESP8266) - WiFi.scanNetworks(true, true, 0U, ssid); + })()); #else - WiFi.scanNetworks(true, true, false, 300U, 0U, ssid); + WiFi.scanNetworks(true, true, false, 300U, 0U, ([this] () { + if(mConfig->sys.isHidden) + return (char*)NULL; + return (mConfig->sys.stationSsid); + })()); #endif return; }