From: hcj <1224667075@qq.com> Date: Wed, 9 Oct 2024 01:44:19 +0000 (+0800) Subject: 修改开启运动回复模式,改由UI来回复是否成功 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F1129%2Fhead;p=mirrors%2FFD230.git 修改开启运动回复模式,改由UI来回复是否成功 --- 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 1e28a15a5..9f2681ded 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c @@ -4190,6 +4190,19 @@ static void DeleteFileTypeCmd(uint16_t cmd,uint8_t *data,uint16_t len,uint8_t *t } } //开启指定运动模式 +void reply_APP_OpenSportModeCmd(bool falg) +{ + + ble_data_type type_={0x01,0x06,1,1,1}; + char data[1]={0}; + if(falg) + data[0]=1; + else + data[0]=2; + send_big_data(type_,data,1); + +} + static void OpenSportModeCmd(uint16_t cmd,uint8_t *data,uint16_t len,uint8_t *totaldata,uint8_t crcvalue) { @@ -4210,10 +4223,12 @@ static void OpenSportModeCmd(uint16_t cmd,uint8_t *data,uint16_t len,uint8_t *to training_ble_data.controlmd= START; printf("开启指定运动%d\r\n",data[0]); CustomEventPublish(TOPIC_EVENT_BLE_TRAINING,(uint8_t*)&training_ble_data,sizeof(training_ble)); - value[17] = 1; //1 操作成功 2 操作失败 - value[18] = Calculate_CRC(value,18); - sendBleData(value,19); - }else + + // value[17] = 1; //1 操作成功 2 操作失败 + // value[18] = Calculate_CRC(value,18); + // sendBleData(value,19); + } + else { value[17] = 0; value[18] = Calculate_CRC(value,18); diff --git a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.h b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.h index a3c1900fb..926d6b029 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.h +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.h @@ -835,6 +835,7 @@ void reply_APP_SportStopModeCmd(uint16_t time); void watch_clean_pairs(void); +void reply_APP_OpenSportModeCmd(bool falg); ///////////////////////////自定义文件传输协议/////////////////////////////