Fix Indentation

pull/84/head
KatAst 9 years ago
parent 9dd3eac804
commit cf7635dad7
  1. 18
      esp-link/cgiwifi.c

@ -306,19 +306,25 @@ static void ICACHE_FLASH_ATTR resetTimerCb(void *arg) {
DBG("Wifi check: mode=%s status=%d\n", wifiMode[m], x);
if(m!=2){
if( x == STATION_GOT_IP ){
if ( x == STATION_GOT_IP ) {
if (m != 1) {
#ifdef CHANGE_TO_STA
if(m != 1)
// 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
#endif
}
log_uart(false);
}else{
log_uart(true);
DBG("Enabling/continuing uart log\n");
if (m==1){
// no more resetTimer at this point, gotta use physical reset to recover if in trouble
} else {
if (m != 3) {
DBG("Wifi connect failed. Going into STA+AP mode..\n");
wifi_set_opmode(3);
wifi_softap_set_config(&apconf);
}
log_uart(true);
DBG("Enabling/continuing uart log\n");
os_timer_arm(&resetTimer, RESET_TIMEOUT, 0);
}
}

Loading…
Cancel
Save