From b40a82b6c5dbdcefcec4b8a7ecdc058741f65dd9 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Wed, 25 Dec 2024 17:40:07 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E6=94=B9=E5=9B=A00502=E6=8C=87?= =?utf8?q?=E4=BB=A4=E9=80=A0=E6=88=90=E7=9A=84=E5=A4=9A=E6=AC=A1=E5=90=8C?= =?utf8?q?=E6=AD=A5=E6=95=B0=E6=8D=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../service/ble_service/bleservice/bleEvent.c | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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++) -- 2.17.1