Fix Indentation

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

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

Loading…
Cancel
Save