mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-07 12:07:09 +03:00
Fix ota percent update for ui
This commit is contained in:
@@ -129,7 +129,9 @@ const int WIFI_MANAGER_SCAN_BIT = BIT7;
|
||||
const int WIFI_MANAGER_REQUEST_DISCONNECT_BIT = BIT8;
|
||||
|
||||
|
||||
|
||||
void wifi_manager_refresh_ota_json(){
|
||||
wifi_manager_send_message(EVENT_REFRESH_OTA, NULL);
|
||||
}
|
||||
|
||||
void wifi_manager_scan_async(){
|
||||
wifi_manager_send_message(ORDER_START_WIFI_SCAN, NULL);
|
||||
@@ -1131,9 +1133,15 @@ void wifi_manager( void * pvParameters ){
|
||||
|
||||
/* callback */
|
||||
if(cb_ptr_arr[msg.code]) (*cb_ptr_arr[msg.code])(NULL);
|
||||
|
||||
break;
|
||||
|
||||
case UPDATE_CONNECTION_OK:
|
||||
/* refresh JSON with the new ota data */
|
||||
if(wifi_manager_lock_json_buffer( portMAX_DELAY )){
|
||||
/* generate the connection info with success */
|
||||
wifi_manager_generate_ip_info_json( UPDATE_CONNECTION_OK );
|
||||
wifi_manager_unlock_json_buffer();
|
||||
}
|
||||
break;
|
||||
case ORDER_DISCONNECT_STA:
|
||||
ESP_LOGI(TAG, "MESSAGE: ORDER_DISCONNECT_STA");
|
||||
|
||||
|
||||
@@ -212,7 +212,8 @@ typedef enum message_code_t {
|
||||
EVENT_STA_DISCONNECTED = 12,
|
||||
EVENT_SCAN_DONE = 13,
|
||||
EVENT_STA_GOT_IP = 14,
|
||||
MESSAGE_CODE_COUNT = 15 /* important for the callback array */
|
||||
EVENT_REFRESH_OTA = 15,
|
||||
MESSAGE_CODE_COUNT = 16 /* important for the callback array */
|
||||
|
||||
}message_code_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user