Browse Source

fix compile

pull/985/head
lumapu 2 years ago
parent
commit
bdf43fd522
  1. 2
      src/app.cpp
  2. 13
      src/wifi/ahoywifi.cpp

2
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()));

13
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;
}

Loading…
Cancel
Save