From d43d1e262310dccf0ab4345019b5efac577e1c40 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Fri, 27 Jun 2025 16:25:15 +0800 Subject: [PATCH] =?utf8?q?=E5=BC=80=E6=9C=BA=E5=88=9D=E5=A7=8B=E5=8C=96?= =?utf8?q?=E6=93=8D=E4=BD=9C=E4=BB=A3=E7=A0=81=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativelauncher/src/NativeLauncher.cpp | 25 +++++++++++-------- .../bluetooth/src/BluetoothDeviceListView.cpp | 2 +- .../bluetooth/src/BluetoothEarListView.cpp | 2 +- .../bluetooth/src/BluetoothOptionsView.cpp | 4 +-- .../bluetooth/src/BluetoothReconnectView.cpp | 4 +-- .../player/include/PlayersPresenter.h | 7 ++---- .../nativeui/player/include/PlayersView.h | 7 ++---- .../nativeui/player/src/PlayersView.cpp | 15 ----------- .../nativeui/traing/include/TraingModel.h | 2 +- .../nativeui/traing/src/TraingModel.cpp | 2 +- 10 files changed, 26 insertions(+), 44 deletions(-) diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp index 0959763a4..c122e4bd7 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp @@ -39,6 +39,18 @@ #include #include "rebootandshutdown/include/RebootAndShutdownModel.h" #include +#include "system/include/SystemLogModel.h" +#include "traing/include/TraingModel.h" +#include "goal/include/goalmodel.h" +#include "takephotos/include/TakephotosModel.h" +#include "message/include/MessageModel.h" +#include "assistant/include/AssistantModel.h" +#include "battery_hal.h" +#include "main/include/dial/DialModelCharge.h" +#include "schedule/include/ScheduleModel.h" +#include "sleep/include/SleepModel.h" +#include "main/include/MainModel.h" + namespace OHOS { @@ -93,14 +105,7 @@ void NativeLauncher::InitNativeLauncher(LaunchMode mode) // 初始化所有预加载slice InitAllNativeSlices(); - PlayersModel::GetInstance()->AudioInit();//音乐初始化 - RebootAndShutdownModel::GetInstance().RegisterAllKeyEvents();// 注册按键事件 - //音乐列表初始化,放在nativelauncher 初始化,防止手表连接耳机时,操控耳机控制手表音乐造成死机 - do_custom_fileoperate_service_check_msg(CUSTOM_FILEOPERATE_MSG_TYPE_MUSICNAME_READ, nullptr, 0); - cm_initScreenBrightness();// 初始化屏幕亮度 - cm_initializeScreenDuration();// 初始化屏幕时长 - - #ifdef FD230_650 + // #ifdef FD230_650 CallerLogModel::GetInstance()->InitPhoneService(); GoalModel::GetInstance().GoalModelInitdata();//活动数据初始化 // PresenterTask::GetInstance()->Init(); @@ -155,9 +160,8 @@ void NativeLauncher::InitNativeLauncher(LaunchMode mode) // 开机增加震动 页面启动震动一次 // ui_api_vibrate_once_func(); - #endif + // #endif } - #ifdef FD230_650 // 注册开机时间 SystemLogData systemlog; systemlog.timestamp = SystemLogModel::GetInstance()->GetCurrentTime(); @@ -170,7 +174,6 @@ void NativeLauncher::InitNativeLauncher(LaunchMode mode) SystemLogModel::GetInstance()->load_nextday_log(); // 读取popup_windows日志 SystemLogModel::GetInstance()->load_popup_windows_log(); - #endif } void NativeLauncher::InitAllNativeSlices(void) diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothDeviceListView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothDeviceListView.cpp index 2dd40855a..428f9a46a 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothDeviceListView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothDeviceListView.cpp @@ -111,7 +111,7 @@ namespace OHOS emptyLabel->SetTextId(STR_NO_PAIRED_DEV); // 暂无已配对设备 emptyLabel->SetStyle(STYLE_BACKGROUND_COLOR, OPA_OPAQUE); emptyLabel->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION); - emptyLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_FORTY_SIZE); + emptyLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); emptyLabel->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER, UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER); emptyLabel->SetVisible(false); } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothEarListView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothEarListView.cpp index 2a68bf61a..31bd0e828 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothEarListView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothEarListView.cpp @@ -169,7 +169,7 @@ namespace OHOS } (*button)->SetImageSrc(PNG_NEW_DEVICE, PNG_NEW_DEVICE); (*button)->SetViewId(id); - (*button)->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_FORTY_SIZE); + (*button)->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); } void BluetoothEarListView::InitNewEquipmentButton() diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothOptionsView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothOptionsView.cpp index 97f68abf4..e173eaeae 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothOptionsView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothOptionsView.cpp @@ -151,7 +151,7 @@ namespace OHOS } connectStateLabel->SetPosition(60, 148, 333, 33); connectStateLabel->SetText("已连接"); - connectStateLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_THIRTY_SIZE); + connectStateLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); connectStateLabel->SetStyle(STYLE_BACKGROUND_COLOR, OPA_OPAQUE); connectStateLabel->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER, UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER); connectStateLabel->SetVisible(false); @@ -181,7 +181,7 @@ namespace OHOS } optionsOneButton->SetPosition(157, 210, 139, 47); // 157:x, 210:y, 139:width 47:height optionsOneButton->SetText("断开连接"); - optionsOneButton->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_THIRTY_SIZE); + optionsOneButton->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); optionsOneButton->SetViewId(BLUETOOTH_OPTIONONE_BUTTON); optionsOneButton->SetImageSrc(PNG_SELECTION_BOX, PNG_SELECTION_BOX); if (BluetoothModel::GetInstance()->GetBluetoothCalleridStatus() == CALLERPLAYERS) diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothReconnectView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothReconnectView.cpp index df336f54c..4aa486fba 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothReconnectView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothReconnectView.cpp @@ -77,7 +77,7 @@ void BluetoothReconnectView::ShowUpTitleLabel() } titleLabel->SetPosition(87, 285, 280, 45); // 60:x 100:y 333:width 45:height titleLabel->SetText("正在重连..."); - titleLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_FORTY_SIZE); + titleLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); titleLabel->SetStyle(STYLE_BACKGROUND_COLOR, OPA_OPAQUE); titleLabel->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER, UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER); titleLabel->SetVisible(false); @@ -93,7 +93,7 @@ void BluetoothReconnectView::ShowUpTitleLabel() bluetoothNameLabel->SetText(reinterpret_cast(caseInfo->deviceName)); bluetoothNameLabel->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE); bluetoothNameLabel->SetPosition(60, 235, 333, 45); // 60:x 148:y 333:width 33:height - bluetoothNameLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_THIRTY_SIZE); + bluetoothNameLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); bluetoothNameLabel->SetStyle(STYLE_BACKGROUND_COLOR, OPA_OPAQUE); bluetoothNameLabel->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER, UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER); bluetoothNameLabel->SetVisible(false); diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/player/include/PlayersPresenter.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/player/include/PlayersPresenter.h index 72f7a41e1..089441171 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/player/include/PlayersPresenter.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/player/include/PlayersPresenter.h @@ -6,8 +6,8 @@ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/player/include/PlayersPresenter.h */ -#ifndef PLAYERS_PRESENTER_H -#define PLAYERS_PRESENTER_H +#ifndef _PLAYERS_PRESENTER_H_ +#define _PLAYERS_PRESENTER_H_ #include "gfx_utils/list.h" #include "ohos_types.h" #include "components/ui_view.h" @@ -63,9 +63,6 @@ class VolumeSettingView; #define TIPS_FAIL_MESSAGE_VIEW "TipsFailMessageView" #define TIPS_CONN_FAIL_MESSAGE_VIEW "TipsConnFailMessageView" -static constexpr uint8_t FONT_THIRTY_SIZE = 30; // 30:字体大小 -static constexpr uint8_t FONT_FORTY_SIZE = 40; // 40:字体大小 - struct PlayerCaseInfo { char sliceId[DEC_NUM_256]; /*音乐名*/ int16_t index; diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/player/include/PlayersView.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/player/include/PlayersView.h index 53bf93012..b7556ded5 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/player/include/PlayersView.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/player/include/PlayersView.h @@ -6,8 +6,8 @@ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/player/include/PlayersView.h */ -#ifndef PLAYERS_VIEW_H -#define PLAYERS_VIEW_H +#ifndef _PLAYERS_VIEW_H_ +#define _PLAYERS_VIEW_H_ #include "player/include/PlayersPresenter.h" @@ -85,9 +85,6 @@ namespace OHOS void SetPlayerButtonState(UICheckBox::UICheckBoxState state); void PlayerModelButtonSetSrc(uint32_t playMode); void ShowUpListView(void); - int16_t GetVolumeRank(void); - void SetVolumeRank(int16_t value); - void SetVolumeAddOne(void); void SetPlayerCtrVolume(float leftVolume, float rightVolume); UIButton *GetMusicListButton(void); diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/player/src/PlayersView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/player/src/PlayersView.cpp index 18e6446e6..492cca724 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/player/src/PlayersView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/player/src/PlayersView.cpp @@ -58,21 +58,6 @@ namespace OHOS g_pPlayersView = nullptr; } - int16_t PlayersView::GetVolumeRank(void) - { - return volumeSet; - } - - void PlayersView::SetVolumeRank(int16_t value) - { - volumeSet = value; - } - - void PlayersView::SetVolumeAddOne(void) - { - volumeSet++; - } - /*获取音乐来源按钮*/ UIButton *PlayersView::GetOptionsButton(void) { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/include/TraingModel.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/include/TraingModel.h index c28c6bd1f..45b562a03 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/include/TraingModel.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/include/TraingModel.h @@ -121,7 +121,7 @@ namespace OHOS { #define HARD_OFF 1 #define READTEST 0 -#define MAX_HEART_RATE 220 +#define MAX_HEART_RATE_TRAINING 220 #define AGE_THRESHOLD 59 #define LOW_INTENSITY_THRESHOLD 59 #define MEDIUM_INTENSITY_LOWER_THRESHOLD 60 diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingModel.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingModel.cpp index a683e0033..7597c4fc9 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingModel.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingModel.cpp @@ -1459,7 +1459,7 @@ void TraingModel::SetUserSportdata() { ConfigModel::CONFIGMODEL_ITEM_TRANING_FREQ); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "训练频率: %d", user_freq); - user_Intensity = MAX_HEART_RATE - user_Age; + user_Intensity = MAX_HEART_RATE_TRAINING - user_Age; WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "用户运动强度心率: %d", user_Intensity); } -- 2.17.1