|
|
|
@ -335,7 +335,7 @@ static void ICACHE_FLASH_ATTR resetTimerCb(void *arg) { |
|
|
|
|
// We're happily connected, go to STA mode
|
|
|
|
|
DBG("Wifi got IP. Going into STA mode..\n"); |
|
|
|
|
wifi_set_opmode(1); |
|
|
|
|
os_timer_arm(&resetTimer, RESET_TIMEOUT, 0); // check one more time after switching to STA-only
|
|
|
|
|
os_timer_arm_us(&resetTimer, RESET_TIMEOUT * 1000, 0); // check one more time after switching to STA-only
|
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
log_uart(false); |
|
|
|
@ -349,7 +349,7 @@ static void ICACHE_FLASH_ATTR resetTimerCb(void *arg) { |
|
|
|
|
} |
|
|
|
|
log_uart(true); |
|
|
|
|
DBG("Enabling/continuing uart log\n"); |
|
|
|
|
os_timer_arm(&resetTimer, RESET_TIMEOUT, 0); |
|
|
|
|
os_timer_arm_us(&resetTimer, RESET_TIMEOUT * 1000, 0); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -527,7 +527,7 @@ int ICACHE_FLASH_ATTR cgiWiFiSpecial(HttpdConnData *connData) { |
|
|
|
|
// schedule change-over
|
|
|
|
|
os_timer_disarm(&reassTimer); |
|
|
|
|
os_timer_setfn(&reassTimer, configWifiIP, NULL); |
|
|
|
|
os_timer_arm(&reassTimer, 1000, 0); // 1 second for the response of this request to make it
|
|
|
|
|
os_timer_arm_us(&reassTimer, 1 * 1000000, 0); // 1 second for the response of this request to make it
|
|
|
|
|
// return redirect info
|
|
|
|
|
jsonHeader(connData, 200); |
|
|
|
|
httpdSend(connData, url, -1); |
|
|
|
@ -700,7 +700,7 @@ int ICACHE_FLASH_ATTR cgiWiFiSetMode(HttpdConnData *connData) { |
|
|
|
|
wifi_station_connect(); |
|
|
|
|
os_timer_disarm(&resetTimer); |
|
|
|
|
os_timer_setfn(&resetTimer, resetTimerCb, NULL); |
|
|
|
|
os_timer_arm(&resetTimer, RESET_TIMEOUT, 0); |
|
|
|
|
os_timer_arm_us(&resetTimer, RESET_TIMEOUT * 1000, 0); |
|
|
|
|
} |
|
|
|
|
if(previous_mode == 1){ |
|
|
|
|
// moving to AP or STA+AP from STA, so softap config call needed
|
|
|
|
@ -815,7 +815,7 @@ int ICACHE_FLASH_ATTR cgiWiFiConnStatus(HttpdConnData *connData) { |
|
|
|
|
// Reset into AP-only mode sooner.
|
|
|
|
|
os_timer_disarm(&resetTimer); |
|
|
|
|
os_timer_setfn(&resetTimer, resetTimerCb, NULL); |
|
|
|
|
os_timer_arm(&resetTimer, 1000, 0); |
|
|
|
|
os_timer_arm_us(&resetTimer, 1 * 1000000, 0); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|