From: 袁清梦 <3449750381@qq.com> Date: Thu, 29 Aug 2024 02:34:38 +0000 (+0000) Subject: Merge #813 into sdk602patch0626 from refs/changes/813/head X-Git-Tag: release_V1.2.70_20241020_135402~549^2~12^2 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=2525508374b18897cc46310c6a0de6b8acd4e3be;p=mirrors%2FFD230.git Merge #813 into sdk602patch0626 from refs/changes/813/head Code review from 袁清梦 * refs/changes/813/head: (8 commits squashed) - 屏蔽KeyInputListener里面的不使用功能 - Merge branch 'sdk602patch0626' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0626 - 修复密码锁通过蓝牙解锁进行状态同步 - 修改"重新检测->重测“ - 删除重复的字段 - 修复睡眠进度条的两端为圆形 - 修改每日目标进度条方向 - 修改训练中进度条颜色为绿色 Signed-off-by: Caisking <3449750381@qq.com> Reviewed-by: snickersun@163.com Merged-by: snickersun@163.com CR-link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/813 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/codedlock/include/CodedLockModel.h b/code/sdk/application/wearable/fd230app/nativeui/codedlock/include/CodedLockModel.h index 76e12d73e..995b85ccd 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/codedlock/include/CodedLockModel.h +++ b/code/sdk/application/wearable/fd230app/nativeui/codedlock/include/CodedLockModel.h @@ -1,3 +1,9 @@ +/*** + * @Date: 2024-08-21 15:27:38 + * @LastEditors: Caisking 3449750381@qq.com + * @LastEditTime: 2024-08-28 18:32:09 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/codedlock/include/CodedLockModel.h + */ #ifndef CODEDLOCKMODEL_H #define CODEDLOCKMODEL_H @@ -33,6 +39,8 @@ namespace OHOS uint8_t GetPointNum(); // 配置用户密码 void SetUserPassWord(const std::string &password); + // ble进行解锁 + void BleUnlock(); private: CodedLockModel(); diff --git a/code/sdk/application/wearable/fd230app/nativeui/codedlock/src/CodedLockModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/codedlock/src/CodedLockModel.cpp index 25c7d8d25..40175f14a 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/codedlock/src/CodedLockModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/codedlock/src/CodedLockModel.cpp @@ -1,9 +1,13 @@ #include "codedlock/include/CodedLockModel.h" +#include "MainViewSample.h" +#include "codedlock/include/CodedLockView.h" #include #include #include "wearable_log.h" #include "string.h" #include "ConfigModel.h" + +extern "C" void uapi_dev_runtime_set_lock_status(uint8_t status); namespace OHOS { /** @@ -185,4 +189,26 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "密码为空"); } } + + /** + * @brief 更新用户状态 + */ + void CodedLockModel::BleUnlock() + { + // 先进行解锁 + uapi_dev_runtime_set_lock_status(0); + /*设置表盘状态*/ + MainModel::GetInstance().setDialState(DialState::LOCK, false); + + // 获取当前活动视图的实例 + auto mainViewInstance = MainViewSample::GetInstance(); + auto codedLockViewInstance = CodedLockView::GetInstance(); + + // 如果是在主界面或密码锁界面,重新进入主界面 + if (mainViewInstance != nullptr || codedLockViewInstance != nullptr) + { + NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN); + } + } + } \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalview.cpp b/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalview.cpp index 76e51cfac..d0752e1c6 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalview.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalview.cpp @@ -237,8 +237,8 @@ namespace OHOS circleProgress1_->SetForegroundStyle(STYLE_LINE_WIDTH, 20); circleProgress1_->SetCenterPosition(233, 229); circleProgress1_->SetRadius(205); - circleProgress1_->SetStartAngle(40); - circleProgress1_->SetEndAngle(320); + circleProgress1_->SetStartAngle(320); + circleProgress1_->SetEndAngle(40); circleProgress1_->SetValue(GoalModel::GetInstance().getstepvalue()); circleProgress1_->SetBackgroundImagePosition(36, 26); circleProgress1_->SetCapType(CAP_ROUND); diff --git a/code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepView.cpp b/code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepView.cpp index 23f40d376..4aca60cf4 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepView.cpp @@ -23,6 +23,7 @@ namespace OHOS { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " SleepView::~SleepView"); ClearAll(); + g_pSleepView = nullptr; } @@ -47,6 +48,7 @@ namespace OHOS float value = (static_cast(SleepModel::GetInstance().get_sleep_total()) / static_cast(SleepModel::GetInstance().get_sleep_goal())) * 100.0f; WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "value %d!", value); circleProgress_->SetValue(value); + circleProgress_->SetCapType(CAP_ROUND); } // 更新目标时间 diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingDataView.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingDataView.cpp index 002bc7501..463bb1860 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingDataView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingDataView.cpp @@ -65,7 +65,7 @@ namespace OHOS circleProgress->SetBackgroundStyle(STYLE_LINE_WIDTH, 12); circleProgress->SetForegroundStyle(STYLE_BACKGROUND_COLOR, 0xff2195F6); circleProgress->SetForegroundStyle(STYLE_BORDER_COLOR, 0xff000000); - circleProgress->SetForegroundStyle(STYLE_LINE_COLOR, 0xff45A5FF); + circleProgress->SetForegroundStyle(STYLE_LINE_COLOR, 0xff4fC34C); circleProgress->SetForegroundStyle(STYLE_LINE_WIDTH, 10); circleProgress->SetCenterPosition(235, 235); circleProgress->SetRadius(215); @@ -82,8 +82,8 @@ namespace OHOS InitLabel(curtimelabel, 155, 60, 150, 50, "label1", "23:54", DEFAULT_VECTOR_FONT_FILENAME, 40); - InitLabel(timerlabel, 0, 163, 466, 150, "label3", "00:00:00", GILROY_BOLD_FONT, 80); - InitLabel(heartlabel, 85, 284, 230, 80, "label4", "144", GILROY_BOLD_FONT, 60); + InitLabel(timerlabel, 0, 163, 466, 150, "label3", "00:00:00", DEFAULT_VECTOR_FONT_FILENAME, 80); + InitLabel(heartlabel, 85, 284, 230, 80, "label4", "144", DEFAULT_VECTOR_FONT_FILENAME, 60); InitLabel(ubpmlabel, 218, 284, 230, 80, "label5", "bpm", DEFAULT_VECTOR_FONT_FILENAME, 60); ubpmlabel->SetTextColor(Color::Gray()); Add(curtimelabel); 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 7db379f46..99d68d6db 100644 --- a/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp +++ b/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp @@ -615,6 +615,12 @@ void ble_set_password(uint8_t falg, char * data) printf("设置手表密码 %d %s \r\n",falg, data); /*更新model密码配置*/ + if(falg == 0) + { + //更新手表状态 + GraphicService::GetInstance()->PostGraphicEvent( + std::bind(&OHOS::CodedLockModel::BleUnlock, OHOS::CodedLockModel::GetInstance())); + } OHOS::CodedLockModel::GetInstance()->SetUserPassWord(data); return; diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/zh.lang b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/zh.lang index 1492dc254..94677db74 100644 Binary files a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/zh.lang and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/zh.lang differ diff --git a/tools/language_tool/Language_xml/input_list_zh.txt b/tools/language_tool/Language_xml/input_list_zh.txt index 00a6ccf62..50bed8a31 100644 --- a/tools/language_tool/Language_xml/input_list_zh.txt +++ b/tools/language_tool/Language_xml/input_list_zh.txt @@ -271,7 +271,7 @@ STR_CHECKERROR$检测不到结果 STR_WAERKEEP$请确认已带上手表,并保持静止 STR_WEARRE$进行重新检测 STR_WEARREADY$准备好后点击下方按钮 -STR_RECHECK$重新检测 +STR_RECHECK$重测 STR_CHECKEWARN$血氧提醒 STR_BLOODSHORT$当前血氧含量已低于XX% STR_HEARTNOTE$请注意身体健康 diff --git a/tools/language_tool/Language_xml/language.xlsx b/tools/language_tool/Language_xml/language.xlsx index ff7f4b385..999cdd385 100644 Binary files a/tools/language_tool/Language_xml/language.xlsx and b/tools/language_tool/Language_xml/language.xlsx differ diff --git a/tools/language_tool/Language_xml/language_zh.xml b/tools/language_tool/Language_xml/language_zh.xml index ae3b258b7..e3658d882 100644 --- a/tools/language_tool/Language_xml/language_zh.xml +++ b/tools/language_tool/Language_xml/language_zh.xml @@ -272,7 +272,7 @@ - + diff --git a/tools/language_tool/font/zh.lang b/tools/language_tool/font/zh.lang index 1492dc254..94677db74 100644 Binary files a/tools/language_tool/font/zh.lang and b/tools/language_tool/font/zh.lang differ