From dc9b02fcd3da22b23b05a1cdc4415bbed81547d8 Mon Sep 17 00:00:00 2001 From: Caisking <3449750381@qq.com> Date: Tue, 2 Jul 2024 20:45:04 +0800 Subject: [PATCH] =?utf8?q?=E9=83=A8=E5=88=86=E6=8F=90=E4=BA=A4=E6=9B=B4?= =?utf8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp | 4 ++-- .../heart_blood/health_service/health_service.cpp | 4 ++-- .../fd230app/nativeui/set_dial/include/SetDialModel.h | 8 +++++++- 3 files changed, 11 insertions(+), 5 deletions(-) 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 9e3af5bac..0f072b209 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp @@ -254,7 +254,7 @@ extern "C" } } // 进入睡眠模式 - if ((curTime.tm_hour == (sleep_time >> 16)) && (curTime.tm_min == (sleep_time & 0X00FF)) && (curTime.tm_sec == 0)) + if (curTime.tm_hour == ((sleep_time & 0XFFFF0000) >> 16) && curTime.tm_min == (sleep_time & 0X0000FFFF) && curTime.tm_sec == 0) { do_cywee_service_check_msg(CYWEE_SERVICE_CMD_SLEEPING_MODE, NULL); // 睡眠弹窗 @@ -264,7 +264,7 @@ extern "C" OHOS::SleepModel::GetInstance().set_sleep_state(OHOS::SLEEPSTATE::SLEPP); } // 退出睡眠模式 - if ((curTime.tm_hour == (wake_up_time >> 16)) && (curTime.tm_min == (wake_up_time & 0X00FF)) && (curTime.tm_sec == 0)) + if (curTime.tm_hour == ((wake_up_time & 0XFFFF0000) >> 16) && curTime.tm_min == (wake_up_time & 0X0000FFFF) && curTime.tm_sec == 0) { printf("起床啦!\r\n"); do_cywee_service_check_msg(CYWEE_SERVICE_CMD_NAP_SEDENTARY_MODE, NULL); diff --git a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp index 4b09d1c5e..47137fd58 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp @@ -236,7 +236,7 @@ namespace OHOS } // 判断文件是否存在 不存在即创建 并打开以输出模式 - std::ofstream outFile(BLOOD_JSON_PATH, std::ios::app); + std::ofstream outFile(BLOOD_JSON_PATH, std::ios::trunc); if (!outFile.is_open()) { // 文件创建失败 @@ -299,7 +299,7 @@ namespace OHOS } // 判断文件是否存在 不存在即创建 并打开以输出模式 - std::ofstream outFile(HEART_JSON_PATH, std::ios::app); + std::ofstream outFile(HEART_JSON_PATH, std::ios::trunc); if (!outFile.is_open()) { // 文件创建失败 diff --git a/code/sdk/application/wearable/fd230app/nativeui/set_dial/include/SetDialModel.h b/code/sdk/application/wearable/fd230app/nativeui/set_dial/include/SetDialModel.h index 15bf2219d..ea6abd2e3 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/set_dial/include/SetDialModel.h +++ b/code/sdk/application/wearable/fd230app/nativeui/set_dial/include/SetDialModel.h @@ -1,3 +1,9 @@ +/*** + * @Date: 2024-06-17 11:38:34 + * @LastEditors: Caisking 3449750381@qq.com + * @LastEditTime: 2024-07-02 20:41:18 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/set_dial/include/SetDialModel.h + */ /*** * @Date: 2024-06-17 11:38:34 * @LastEditors: Caisking 3449750381@qq.com @@ -61,7 +67,7 @@ namespace OHOS virtual ~SetDialModel(); int32_t ParseDialHeader(int type, const std::string &dialFileName, SetDialInfo &dialInfo); std::vector dialInfoList; - uint16_t currentDialID; + uint16_t currentDialID = 1028; // 设置表盘默认值 }; } -- 2.17.1