mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-25 06:46:10 +02:00
fix compile
This commit is contained in:
parent
4e54bcf299
commit
bdf43fd522
2 changed files with 9 additions and 6 deletions
|
@ -65,7 +65,7 @@ void app::setup() {
|
||||||
#if defined(ESP32)
|
#if defined(ESP32)
|
||||||
mHmsPayload.setup(this, &mSys, &mCmtRadio, &mStat, 5, &mTimestamp);
|
mHmsPayload.setup(this, &mSys, &mCmtRadio, &mStat, 5, &mTimestamp);
|
||||||
mHmsPayload.enableSerialDebug(mConfig->serial.debug);
|
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
|
#endif
|
||||||
/*DBGPRINTLN("--- after payload");
|
/*DBGPRINTLN("--- after payload");
|
||||||
DBGPRINTLN(String(ESP.getFreeHeap()));
|
DBGPRINTLN(String(ESP.getFreeHeap()));
|
||||||
|
|
|
@ -104,15 +104,18 @@ void ahoywifi::tickWifiLoop() {
|
||||||
DBGPRINTLN(String(mConfig->sys.stationSsid));
|
DBGPRINTLN(String(mConfig->sys.stationSsid));
|
||||||
mScanCnt = 0;
|
mScanCnt = 0;
|
||||||
mScanActive = true;
|
mScanActive = true;
|
||||||
uint8_t *ssid = ([this] () {
|
#if defined(ESP8266)
|
||||||
|
WiFi.scanNetworks(true, true, 0U, ([this] () {
|
||||||
if(mConfig->sys.isHidden)
|
if(mConfig->sys.isHidden)
|
||||||
return (uint8_t *)NULL;
|
return (uint8_t *)NULL;
|
||||||
return (uint8_t *)(mConfig->sys.stationSsid);
|
return (uint8_t *)(mConfig->sys.stationSsid);
|
||||||
})();
|
})());
|
||||||
#if defined(ESP8266)
|
|
||||||
WiFi.scanNetworks(true, true, 0U, ssid);
|
|
||||||
#else
|
#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
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue