From: hcj <1224667075@qq.com> Date: Wed, 25 Dec 2024 09:40:07 +0000 (+0800) Subject: 修改因0502指令造成的多次同步数据问题 X-Git-Tag: v1.3.113-repair_tp~62^2~6 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F1568%2F1;p=mirrors%2FFD230.git 修改因0502指令造成的多次同步数据问题 --- diff --git a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c index 294fef80b..9ef0c5b50 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c @@ -5604,6 +5604,9 @@ static void UnpairMessCmd(uint16_t cmd,uint8_t *data,uint16_t len,uint8_t *total sendBleData(value,19); } } + +uint8_t is_connect_synchronization_time=0; + //app发送同步数据结束消息 static void GetSynDataEndCmd(uint16_t cmd,uint8_t *data,uint16_t len,uint8_t *totaldata,uint8_t crcvalue) { @@ -5626,7 +5629,20 @@ static void GetSynDataEndCmd(uint16_t cmd,uint8_t *data,uint16_t len,uint8_t *to sendBleData(value,19); uapi_save_runtime_log(RUNTIME_LOG_BLE_APP_SYN_END); - watch_synchronization_time(); + if(is_connect_synchronization_time) + { + watch_synchronization_time(); + } + else + { + if(g_ble_conn_id) + { + is_connect_synchronization_time=1; + } + + } + + uapi_ble_connect_param_update(BLE_CONNECT_INTERVAL_SLOW); @@ -8658,6 +8674,9 @@ void free_ble_data_Event(void)//以防断开蓝牙没有释放数据类型 recvBigDataBufState = false; sendbigDataBufState = false; + is_connect_synchronization_time=0; + + cancel_recv_file(1); for (int i = 0 ; i < MAX_HANDLE_NUM ; i++)