mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-24 14:26:11 +02:00
fix Interrupt
fix connect to WiFi with only one AP
This commit is contained in:
parent
a85ed6c089
commit
edefcf1c83
5 changed files with 26 additions and 8 deletions
|
@ -88,7 +88,12 @@ void ahoywifi::tickWifiLoop() {
|
|||
}
|
||||
mCnt++;
|
||||
|
||||
if(!mScanActive && mBSSIDList.empty()) { // start scanning APs with the given SSID
|
||||
uint8_t timeout = 10; // seconds
|
||||
if (mStaConn == CONNECTED) // connected but no ip
|
||||
timeout = 20;
|
||||
|
||||
|
||||
if(!mScanActive && mBSSIDList.empty() && ((mCnt % timeout) == 0)) { // start scanning APs with the given SSID
|
||||
DBGPRINT(F("scanning APs with SSID "));
|
||||
DBGPRINTLN(String(mConfig->sys.stationSsid));
|
||||
mScanCnt = 0;
|
||||
|
@ -100,12 +105,6 @@ void ahoywifi::tickWifiLoop() {
|
|||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t timeout = 10; // seconds
|
||||
|
||||
if (mStaConn == CONNECTED) // connected but no ip
|
||||
timeout = 20;
|
||||
|
||||
DBGPRINT(F("reconnect in "));
|
||||
DBGPRINT(String(timeout-mCnt));
|
||||
DBGPRINTLN(F(" seconds"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue