优化ble传输成功后可能没有收到后续指令导致的卡在传输中界面
authorhcj <1224667075@qq.com>
Mon, 16 Dec 2024 09:45:56 +0000 (17:45 +0800)
committerhcj <1224667075@qq.com>
Mon, 16 Dec 2024 09:45:56 +0000 (17:45 +0800)
code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c
code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp

index 954d837..fca83a1 100644 (file)
@@ -7021,6 +7021,12 @@ errcode_t decode_ota_data(ble_read_data *buffer_handle,uint8_t *data,uint16_t da
                     BR_TRANSFER_timer = NULL;\r
                 }\r
                 ble_read_timer_p=NULL;\r
+\r
+                TRANSMIT_DATA=FILE_IS_DONE;\r
+        \r
+                CustomEventPublish(TOPIC_EVENT_BLE_TRANSMIT,&TRANSMIT_DATA,1);\r
+\r
+\r
                 ble_reply_cmd(OTA_FILE_SUCC_CMD,1);//接收成功\r
             }\r
 \r
@@ -8312,6 +8318,9 @@ errcode_t handle_recv_file(ble_read_data *buffer_handle,uint8_t *data, uint16_t
             BR_TRANSFER_timer = NULL;\r
         }\r
         ble_read_timer_p=NULL;\r
+        TRANSMIT_DATA=FILE_IS_DONE;\r
+\r
+        CustomEventPublish(TOPIC_EVENT_BLE_TRANSMIT,&TRANSMIT_DATA,1);\r
        \r
         ble_reply_cmd(FILE_RECV_REPLY_STAT_CMD,1);//接收成功\r
     }\r
index d572ea6..85b45da 100644 (file)
@@ -1810,6 +1810,10 @@ void MsgCenterNotifybleTransmit(const Topic topic, Request* req)
         if(transmittingISShow())
         NotificationManager::GetInstance()->StopNotify();
     }
+    else if (data[0]==FILE_IS_DONE)
+    {
+        set_transmittingShow_falg(data[0]);
+    }
     else
     {
         set_transmittingShow_falg(data[0]);