From: hcj <1224667075@qq.com> Date: Thu, 17 Oct 2024 08:45:15 +0000 (+0800) Subject: 修改设置用户数据协议 X-Git-Tag: release_V1.2.70_20241020_135402~9^2~7 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=77dbde3950271c0e4e4a1677da3f5433aec9a6db;p=mirrors%2FFD230.git 修改设置用户数据协议 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp b/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp index 8e9adfc5f..3bb082aa0 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp @@ -339,9 +339,9 @@ extern "C" { AlarmClockEventData unuse; WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "on_time_CallBackProc invoked"); - - GraphicService::GetInstance()->PostGraphicEvent( - std::bind(AlarmTimerEventPublish, TOPIC_EVENT_ON_TIME, unuse)); + AlarmTimerEventPublish(TOPIC_EVENT_ON_TIME, unuse); + // GraphicService::GetInstance()->PostGraphicEvent( + // std::bind(AlarmTimerEventPublish, TOPIC_EVENT_ON_TIME, unuse)); // AlarmTimerEventPublish(TOPIC_EVENT_ON_TIME, unuse); } diff --git a/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp b/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp index ad1b20fd7..02935e1c1 100644 --- a/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp +++ b/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp @@ -1887,6 +1887,10 @@ void set_user_data(msg_user_info_t *data) //目标燃脂 printf("目标燃脂 %d\r\n",data->fat_time); p_ConfigModel->set_condigData_Int(OHOS::ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_DURATION,data->fat_time); + printf("目标卡路里 %d\r\n",data->fat_time); + p_ConfigModel->set_condigData_Int(OHOS::ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_CALORIES,data->calorie); + printf("目标距离 %d\r\n",data->fat_time); + p_ConfigModel->set_condigData_Int(OHOS::ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_DISTANCE,data->distance); do_cywee_service_check_msg(CYWEE_SERVICE_CMD_SET_USER_INFO, NULL); if(data->timeformat==0) @@ -1894,6 +1898,8 @@ void set_user_data(msg_user_info_t *data) else p_ConfigModel->set_condigData_Int(OHOS::ConfigModel::CONFIGMODEL_ITEM_24HOUR,12); + + SendMsgToUIService(UI_UPDATE_GOAL, 0, nullptr, 0); 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 5ba992094..b36d32b93 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c @@ -3486,11 +3486,7 @@ void SetUserInfo(ble_read_data *buffer_handle,uint16_t cmd,uint8_t *data,uint16_ printf("getUserInfo "); - // for(uint8_t i = 0;itarget_step; msg_userinfo.timeformat = p_userinfo->timeformat; msg_userinfo.weight = p_userinfo->weight; + msg_userinfo.calorie=p_userinfo->calorie; + msg_userinfo.distance=p_userinfo->distance; printf("getUserInfo:!!age %d, fat %d, sex %d, height %d, stand %d, step %d , timeformat %d , weight %d !!!!!!\r\n", p_userinfo->age, 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 12066d9b0..00184e474 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.h +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.h @@ -674,6 +674,9 @@ typedef struct uint16_t fat_time;//燃脂时间目标 uint8_t target_stand;//目标站立 uint8_t timeformat;//时间制 0 24小时制 1 12小时制 + + uint16_t calorie;//目标卡路里 + uint8_t distance;//目标距离 }msg_user_info_t;//获取用户信息 身高体重