修复站立目标设置没生效bug 1005/6 1005/head
authorhcj <1224667075@qq.com>
Tue, 24 Sep 2024 06:32:24 +0000 (14:32 +0800)
committerhcj <1224667075@qq.com>
Tue, 24 Sep 2024 06:32:24 +0000 (14:32 +0800)
code/sdk/application/wearable/fd230app/nativeui/goal/src/goalmodel.cpp
code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c

index 0e9878a..2ec1188 100644 (file)
@@ -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;
index dcbc61e..afa0959 100644 (file)
@@ -1573,12 +1573,16 @@ static void SetOtherTarget(uint16_t cmd,uint8_t *data,uint16_t len,uint8_t *tota
         uint8_t vibratior = data[6];//振动\r
         uint8_t notify = data[7];//通知\r
 \r
-        set_goal_caloriescount(target_kcal);\r
+        \r
         set_goal_discount(target_km);\r
         set_goal_standupcount(target_stand);\r
         set_goal_durationcount(target_fattime);\r
+\r
+        set_goal_caloriescount(target_kcal);\r
+        \r
         set_SilentMode(ring);\r
         set_vibrationremiander(vibratior);\r
+\r
         set_notify_switch(notify);\r
         sendBuf[17] = 1;\r
         sendBuf[18] = Calculate_CRC(sendBuf,18);\r
@@ -7154,7 +7158,7 @@ void decode_file_checksum(ble_read_data *buffer_handle)
         case 2://mp3\r
                 TRANSMIT_DATA=TRANS_MP3_FAIL;\r
                 CustomEventPublish(TOPIC_EVENT_BLE_TRANSMIT,&TRANSMIT_DATA,1);\r
-                \r
+\r
                 break;\r
         case 3://dial\r
                 TRANSMIT_DATA= TRANS_DIAL_FAIL;\r