From 3b75338247d703533128b6ea85e7f6ca5bb5b81b Mon Sep 17 00:00:00 2001 From: Caisking <3449750381@qq.com> Date: Wed, 6 Nov 2024 17:47:32 +0800 Subject: [PATCH] =?utf8?q?=E7=B3=BB=E7=BB=9F=EF=BC=9A=E4=BC=98=E5=8C=96nex?= =?utf8?q?tday?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/activity/src/ActivityModel.cpp | 4 ++-- .../src/AlarmClockTimerConfig.cpp | 8 ++++--- .../bloodoxygen/src/BloodOxygenModel.cpp | 2 +- .../health_service/health_service.cpp | 2 +- .../nativeui/heartrate/src/HeartModel.cpp | 22 +++---------------- 5 files changed, 12 insertions(+), 26 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/activity/src/ActivityModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/activity/src/ActivityModel.cpp index 5eb74d044..a8ef9398d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/activity/src/ActivityModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/activity/src/ActivityModel.cpp @@ -228,8 +228,8 @@ static void Notify(void *args, const Topic topic, Request* request) if (request->msgId == TOPIC_EVENT_NEXTDAY_UPDATE) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "STEP:TOPIC_EVENT_NEXTDAY_UPDATE"); - uint32_t refreshValue = OHOS::ActivityModel::GetInstance()->ZeroHourStepHandle(); - RefreshStepControls(refreshValue, TOPIC_EVENT_NEXTDAY_UPDATE); + // uint32_t refreshValue = OHOS::ActivityModel::GetInstance()->ZeroHourStepHandle(); + // RefreshStepControls(refreshValue, TOPIC_EVENT_NEXTDAY_UPDATE); } } 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 64ee7801b..97a51976f 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp @@ -327,10 +327,12 @@ extern "C" WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Current time - Hour: %d, Minute: %d", localTime->tm_hour, localTime->tm_min); WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Posting next day update event"); - // GraphicService::GetInstance()->PostGraphicEvent( - // std::bind(AlarmTimerEventPublish, TOPIC_EVENT_NEXTDAY_UPDATE, unuse)); #endif - AlarmTimerEventPublish(TOPIC_EVENT_NEXTDAY_UPDATE, unuse); + + GraphicService::GetInstance()->PostGraphicEvent(std::bind( + AlarmTimerEventPublish, TOPIC_EVENT_NEXTDAY_UPDATE, unuse)); + + // AlarmTimerEventPublish(TOPIC_EVENT_NEXTDAY_UPDATE, unuse); SetZeroAlarm(); // 重置nextday闹钟 } diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodoxygen/src/BloodOxygenModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/bloodoxygen/src/BloodOxygenModel.cpp index 586273d67..35c14694a 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodoxygen/src/BloodOxygenModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodoxygen/src/BloodOxygenModel.cpp @@ -276,7 +276,7 @@ namespace OHOS // 更新血氧数据 void BloodOxygenModel::CleanAllData(void) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Nextday!"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Nextday!"); if (MainViewSample::GetInstance() != nullptr && BloodCardView::GetInstance() != nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "更新主界面血氧卡片"); 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 62e88de74..629ae1d2a 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 @@ -180,7 +180,7 @@ BloodOxygenData *HealthService::ReadBloodOxygenData() { // 读取文件 std::ifstream inFile(BLOOD_JSON_PATH); if (!inFile.is_open()) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Failed to open JSON file"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Failed to open JSON file"); return nullptr; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/heartrate/src/HeartModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/heartrate/src/HeartModel.cpp index 4c6ba590c..7a54b1594 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/heartrate/src/HeartModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/heartrate/src/HeartModel.cpp @@ -116,25 +116,9 @@ static void Notify(void *args, const Topic topic, Request *request) { uapi_dev_runtime_get_respiratory_training_status() || request == NULL) { return; } - - switch (request->msgId) { - case TOPIC_EVENT_HEARTRATE_UPDATA: - // 主界面刷新 - GraphicService::GetInstance()->PostGraphicEvent(std::bind( - &HeartModel::RefreshHeartRateScreen, HeartModel::GetInstance())); - // ProcessHeartRateUpdate(request); - break; - - case TOPIC_EVENT_NEXTDAY_UPDATE: - case TOPIC_EVENT_UTCTIME_UPDATE: - RefreshHeartData(); - break; - - case TOPIC_EVENT_WEARSTATE_UPDATE: - break; - - default: - break; + if (request->msgId == TOPIC_EVENT_HEARTRATE_UPDATA) { + GraphicService::GetInstance()->PostGraphicEvent(std::bind( + &HeartModel::RefreshHeartRateScreen, HeartModel::GetInstance())); } } -- 2.17.1