diff --git a/main/core/wifi/wifi.c b/main/core/wifi/wifi.c index a246532..a163e35 100644 --- a/main/core/wifi/wifi.c +++ b/main/core/wifi/wifi.c @@ -163,18 +163,14 @@ static esp_err_t event_handler(void *ctx, system_event_t *event) { ESP_LOGI(SGO_LOG_EVENT, "@WIFI SYSTEM_EVENT_STA_START"); esp_wifi_connect(); set_wifi_status(CONNECTING); -#ifdef on_wifi_status_changed on_wifi_status_changed(); -#endif break; case SYSTEM_EVENT_STA_GOT_IP: ESP_LOGI(SGO_LOG_EVENT, "@WIFI SYSTEM_EVENT_STA_GOT_IP"); xEventGroupSetBits(wifi_event_group, CONNECTED_BIT); xQueueSend(cmd, &CMD_STA_CONNECTED, 0); set_wifi_status(CONNECTED); -#ifdef on_wifi_status_changed on_wifi_status_changed(); -#endif set_ip(TCPIP_ADAPTER_IF_STA); break; case SYSTEM_EVENT_STA_DISCONNECTED: @@ -183,24 +179,18 @@ static esp_err_t event_handler(void *ctx, system_event_t *event) { if (failed) { xQueueSend(cmd, &CMD_STA_CONNECTION_FAILED, 0); set_wifi_status(FAILED); -#ifdef on_wifi_status_changed on_wifi_status_changed(); -#endif } else { xQueueSend(cmd, &CMD_STA_DISCONNECTED, 0); set_wifi_status(DISCONNECTED); -#ifdef on_wifi_status_changed on_wifi_status_changed(); -#endif } xEventGroupClearBits(wifi_event_group, CONNECTED_BIT); break; case SYSTEM_EVENT_AP_START: xQueueSend(cmd, &CMD_AP_START, 0); set_wifi_status(AP); -#ifdef on_wifi_status_changed on_wifi_status_changed(); -#endif set_ip(TCPIP_ADAPTER_IF_AP); break; case SYSTEM_EVENT_AP_STACONNECTED: @@ -293,9 +283,7 @@ static void wifi_task(void *param) { ESP_LOGI(SGO_LOG_EVENT, "@WIFI Too many retries, start AP mode"); n_connection_failed = 0; set_wifi_status(FAILED); -#ifdef on_wifi_status_changed on_wifi_status_changed(); -#endif start_ap(); } } else if (c == CMD_MDNS_CHANGED) { diff --git a/main/core_handler.c b/main/core_handler.c index 295f0d4..4fcbc82 100644 --- a/main/core_handler.c +++ b/main/core_handler.c @@ -33,6 +33,7 @@ status_led_timeline connecting_timeline = { status_led_timeline connected_timeline = { .reset = true, + .loop = false, .fade = false, .step = 1, .red = {LED_MIN_DUTY, LED_MIN_DUTY, LED_MIN_DUTY, LED_MIN_DUTY, LED_MIN_DUTY, LED_MIN_DUTY, LED_MIN_DUTY, LED_MIN_DUTY}, @@ -41,6 +42,7 @@ status_led_timeline connected_timeline = { status_led_timeline connection_failed_timeline = { .reset = true, + .loop = false, .fade = false, .step = 1, .red = {LED_MAX_DUTY, LED_MAX_DUTY/10, LED_MAX_DUTY, LED_MAX_DUTY/10, LED_MAX_DUTY, LED_MAX_DUTY/10, LED_MAX_DUTY, LED_MAX_DUTY/10}, diff --git a/sdkconfig b/sdkconfig index ffacf8b..aa969d6 100644 --- a/sdkconfig +++ b/sdkconfig @@ -49,7 +49,7 @@ CONFIG_FLASH_ENCRYPTION_ENABLED= # # Serial flasher config # -CONFIG_ESPTOOLPY_PORT="/dev/ttyUSB0" +CONFIG_ESPTOOLPY_PORT="/dev/ttyUSB1" CONFIG_ESPTOOLPY_BAUD_115200B= CONFIG_ESPTOOLPY_BAUD_230400B= CONFIG_ESPTOOLPY_BAUD_921600B=y