diff --git a/cmd/handlers.c b/cmd/handlers.c index 3033e5c..28382dd 100644 --- a/cmd/handlers.c +++ b/cmd/handlers.c @@ -131,9 +131,7 @@ CMD_WifiConnect(CmdPacket *cmd) { wifiStatusCb = CMD_WifiCb; // register our callback with wifi subsystem CMD_AddCb("wifiCb", (uint32_t)cmd->callback); // save the MCU's callback lastWifiStatus = wifiIsDisconnected; - if (statusWifiState() != wifiIsDisconnected) { - CMD_WifiCb(statusWifiState()); - } + CMD_WifiCb(wifiState); return 1; } diff --git a/esp-link.vcxproj b/esp-link.vcxproj index 2a774e9..f8db9b3 100644 --- a/esp-link.vcxproj +++ b/esp-link.vcxproj @@ -44,7 +44,7 @@ espmake clean - espmake baseflash + espmake all wiflash espmake clean all espmake clean diff --git a/user/status.c b/user/status.c index 50afb85..a6080fe 100644 --- a/user/status.c +++ b/user/status.c @@ -23,7 +23,6 @@ static void ICACHE_FLASH_ATTR setLed(int on) { } static uint8_t ledState = 0; -static uint8_t wifiState = 0; // Timer callback to update the LED static void ICACHE_FLASH_ATTR ledTimerCb(void *v) {