From: hcj <1224667075@qq.com> Date: Tue, 24 Sep 2024 06:32:24 +0000 (+0800) Subject: 修复站立目标设置没生效bug X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=2b2ca5a5f03afeb94ab3527582f85a49c62d7838;p=mirrors%2FFD230.git 修复站立目标设置没生效bug --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalmodel.cpp b/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalmodel.cpp index 0e9878a94..2ec118812 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalmodel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalmodel.cpp @@ -116,7 +116,7 @@ namespace OHOS char standstr[20]; char *GoalModel::getstandgoal() { - int standdata = ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_DURATION); + int standdata = ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_STANDUP_TIMES); memset((void *)standstr, 0, 20); sprintf_s(standstr, 20, "/%d", standdata); return standstr; 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 dcbc61ed3..afa09591c 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c @@ -1573,12 +1573,16 @@ static void SetOtherTarget(uint16_t cmd,uint8_t *data,uint16_t len,uint8_t *tota uint8_t vibratior = data[6];//振动 uint8_t notify = data[7];//通知 - set_goal_caloriescount(target_kcal); + set_goal_discount(target_km); set_goal_standupcount(target_stand); set_goal_durationcount(target_fattime); + + set_goal_caloriescount(target_kcal); + set_SilentMode(ring); set_vibrationremiander(vibratior); + set_notify_switch(notify); sendBuf[17] = 1; sendBuf[18] = Calculate_CRC(sendBuf,18); @@ -7154,7 +7158,7 @@ void decode_file_checksum(ble_read_data *buffer_handle) case 2://mp3 TRANSMIT_DATA=TRANS_MP3_FAIL; CustomEventPublish(TOPIC_EVENT_BLE_TRANSMIT,&TRANSMIT_DATA,1); - + break; case 3://dial TRANSMIT_DATA= TRANS_DIAL_FAIL;