From: xue <2144439972@qq.com> Date: Wed, 9 Jul 2025 09:57:50 +0000 (+0800) Subject: 修复bug,增加遗漏多国语言 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=765c27911d5e209d054bfc9a5e39fa5523607f5c;p=mirrors%2FFD230.git 修复bug,增加遗漏多国语言 --- diff --git a/code/sdk/application/wearable/fd230app/nativelauncher/include/ui_resource_string.h b/code/sdk/application/wearable/fd230app/nativelauncher/include/ui_resource_string.h index d1ef85a65..2e7c9569d 100644 --- a/code/sdk/application/wearable/fd230app/nativelauncher/include/ui_resource_string.h +++ b/code/sdk/application/wearable/fd230app/nativelauncher/include/ui_resource_string.h @@ -706,7 +706,11 @@ enum UIResourceTextId : uint16_t { STR_CALIB_POSTURE_REQ = 693, STR_ECG = 694, STR_JIUTIAN = 695, - STR_MAX_ID = 696, + STR_LAST_CALIBRATION_TIME = 696, + STR_CALIBRATE = 697, + STR_CALIBRATION_SUGGESTION = 698, + STR_CALIBRATION_PATH = 699, + STR_MAX_ID = 700, }; // UIResourceTextId enum FontLanguageId : uint8_t { diff --git a/code/sdk/application/wearable/fd230app/nativeui/applist/src/ApplistPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/applist/src/ApplistPresenter.cpp index f50c4f33b..fd9d8fdfc 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/applist/src/ApplistPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/applist/src/ApplistPresenter.cpp @@ -15,6 +15,7 @@ #include "traing/include/TraingModel.h" #include #include "heart_blood/health_service/health_service.h" +#include "bloodpressure/include/BPModel.h" #include "battery_hal.h" #include "ConfigModelC.h" #include "bleService.h" @@ -197,7 +198,14 @@ namespace OHOS { viewId = VIEW_UNCONNECTED; } + //需要先校准则进入校准界面 + else if(viewId == VIEW_BLOOD_PRESSURE_CHECK && BPModel::GetInstance()->needMeasure()) + { + viewId = VIEW_BLOOD_PRESSURE_CALIBRATION; + } } + + #endif NativeAbility::GetInstance().EnterSlice(viewId, type); return true; diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPModel.h b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPModel.h index 639cf3962..5f3ac270e 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPModel.h +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPModel.h @@ -138,6 +138,7 @@ namespace OHOS void BP_START(void); void BP_STOP(void); + void BP_CALIBTATION(void); void BP_GetData(uint8_t *sbp, uint8_t *dbp); std::map> GetBPValueMap(void); diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPCalibrationErrorView.cpp b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPCalibrationErrorView.cpp index 56f5dede8..0e0ee700b 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPCalibrationErrorView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPCalibrationErrorView.cpp @@ -102,7 +102,7 @@ namespace OHOS bool BPCalibrationErrorView::Initbackground() { error = new UIImageView(); - error->SetPosition(125, 170, 200, 200); + error->SetPosition(131, 160, 200, 200); error->SetSrc(BPBACKPATH); group->Add(error); return true; diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPLastCalibrationTimeView.cpp b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPLastCalibrationTimeView.cpp index 3aedde31d..f3ea34f13 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPLastCalibrationTimeView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPLastCalibrationTimeView.cpp @@ -1,6 +1,8 @@ #include "bloodpressure/include/BPLastCalibrationTimeView.h" #include "bloodpressure/include/BPMainPresenter.h" #include "wearable_log.h" +#include "ui_resource_image.h" +#include "uicomponents/UIComponents.h" namespace OHOS { @@ -85,7 +87,7 @@ namespace OHOS titleLabel->SetPosition((HORIZONTAL_RESOLUTION - 300) / 2, 50, 300, 35); titleLabel->SetStyle(STYLE_TEXT_FONT, 30); titleLabel->SetStyle(STYLE_LINE_HEIGHT, 35); - titleLabel->SetText("上次校准时间"); + titleLabel->SetTextId(STR_LAST_CALIBRATION_TIME); titleLabel->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION); titleLabel->SetRollSpeed(23); titleLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); @@ -124,7 +126,7 @@ namespace OHOS label1->SetPosition((HORIZONTAL_RESOLUTION - 400) / 2, 180, 400, 35); label1->SetStyle(STYLE_TEXT_FONT, 30); label1->SetStyle(STYLE_LINE_HEIGHT, 35); - label1->SetText("建议每个月都重新校准!"); + label1->SetTextId(STR_CALIBRATION_SUGGESTION); label1->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION); label1->SetRollSpeed(23); label1->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); @@ -144,7 +146,7 @@ namespace OHOS label2->SetPosition((HORIZONTAL_RESOLUTION - 400) / 2, y1, 400, 35); label2->SetStyle(STYLE_TEXT_FONT, 30); label2->SetStyle(STYLE_LINE_HEIGHT, 35); - label2->SetText("校准路径:设置-血压校准"); + label2->SetTextId(STR_CALIBRATION_PATH); label2->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION); label2->SetRollSpeed(23); label2->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); @@ -164,7 +166,7 @@ namespace OHOS calibrationlatterbutton->SetStyle(STYLE_TEXT_FONT, 30); calibrationlatterbutton->SetStyle(STYLE_LINE_HEIGHT, 35); calibrationlatterbutton->SetAlign(TEXT_ALIGNMENT_CENTER); - calibrationlatterbutton->SetText("取消"); + calibrationlatterbutton->SetTextId(STR_CANCEL); calibrationlatterbutton->SetViewId(CALIBRATIONLATTERBUTTON); calibrationlatterbutton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919); calibrationlatterbutton->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); @@ -186,7 +188,7 @@ namespace OHOS CalibrationButton->SetStyle(STYLE_TEXT_FONT, 30); CalibrationButton->SetStyle(STYLE_LINE_HEIGHT, 35); CalibrationButton->SetAlign(TEXT_ALIGNMENT_CENTER); - CalibrationButton->SetText("校准"); + CalibrationButton->SetTextId(STR_CALIBRATE); CalibrationButton->SetViewId(CALIBRATIONBUTTON); CalibrationButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xffff8a36); CalibrationButton->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPMainPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPMainPresenter.cpp index df2c1414b..8ae9e75d3 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPMainPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPMainPresenter.cpp @@ -44,6 +44,10 @@ #include "heart_blood/health_service/health_service.h" #include "gfx_utils/mem_check.h" #include "map" +#ifdef ENABLE_BN02 +#include "bp_service.h" +#include "bp_tcp_server.h" +#endif #define BPKEYABLE 1 namespace OHOS @@ -165,6 +169,8 @@ namespace OHOS } else if (strcmp(view.GetViewId(), VALUECHECKBUTTON) == 0) // 血压值界面到结果分析界面 { + + BPModel::GetInstance()->BP_CALIBTATION(); BPModel::GetInstance()->BP_Control(BPState::BP_CALIBRATING_ANGLYSIS); BPMainView::GetInstance()->ChangeView(BPVALUEVIEW, BPRESULTANALYSISVIEW); } diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPModel.cpp index bfd2b1421..85bddcd39 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPModel.cpp @@ -65,7 +65,7 @@ namespace OHOS #define DECLARE_BP_TIMER 1 #define DECLARE_BP_GETDATA 1 - static uint8_t Time = 30; + static int8_t Time = 30; BPModel::BPModel() {} BPModel::~BPModel() {} @@ -318,7 +318,7 @@ namespace OHOS const BPState StateId; // 视图ID void (BPModel::*func)(); // 对应的视图切换函数指针 }; - // 初始化控制映射表(移除参数传递) + // 初始化控制映射表(移除参数传递 static const BPStateMapper StateMapper[] = { {BPState::BP_IDLE, &BPModel::BPControlidleState}, {BPState::BP_End, &BPModel::BPControlStopMeasure}, @@ -345,6 +345,7 @@ namespace OHOS // 使用控制映射表的示例函数(简化调用) void BPModel::BP_Control(BPState state) { + bool stateFound = false; // 遍历数组查找匹配项 for (size_t i = 0; i < StateMapperSize; ++i) { @@ -353,16 +354,19 @@ namespace OHOS { // 调用成员函数 (this->*(entry.func))(); - current_state = entry.StateId; // 更新当前状态 + BP_SetState(entry.StateId); // 更新当前状态 + stateFound = true; break; } } - /*未知状态,全部状态重置*/ - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BP_Control: Invalid state"); - BP_SetState(BPState::BP_IDLE); - BP_StopTimer(); - Time = BP_CHECK_TIME_MAX; - BP_SetState(state); + if (!stateFound) + { + /*未知状态,全部状态重置*/ + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BP_Control: Invalid state"); + BP_SetState(BPState::BP_IDLE); + BP_StopTimer(); + Time = BP_CHECK_TIME_MAX; + } } // 空闲状态处理 void BPModel::BPControlidleState() @@ -405,26 +409,25 @@ namespace OHOS if (Time != BP_CHECK_TIME_MAX) Time = BP_CHECK_TIME_MAX; // 重置时间90秒 BP_StartTimer(); + BP_SetResultState(BPRESULT::NOT_TESTED); // 重置数据状态 ScreenAlwaysOnCtr(OPEN_SCREEN_ALWAYS_ON); // 后期 周期被动状态 需要做区别 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "start detecting"); BP_START(); // 底层接口开启血压 - custom_dbp = 0; - custom_sbp = 0; } // 首次校准状态处理 void BPModel::BPControlCalibratingFirstTime() { - if (Time != BP_CHECK_TIME_MAX) - Time = BP_CHECK_TIME_MAX; // 重置时间90秒 + BP_StartTimer(); + BP_SetResultState(BPRESULT::NOT_TESTED); // 重置数据状态 ScreenAlwaysOnCtr(OPEN_SCREEN_ALWAYS_ON); // 后期 周期被动状态 需要做区别 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "start detecting"); BP_START(); // 底层接口开启血压 - custom_dbp = 0; - custom_sbp = 0; + if (Time != BP_CHECK_TIME_MAX) + Time = BP_CHECK_TIME_MAX; // 重置时间90秒 } // 第二次校准状态处理 @@ -433,12 +436,11 @@ namespace OHOS if (Time != BP_CHECK_TIME_MAX) Time = BP_CHECK_TIME_MAX; // 重置时间90秒 BP_StartTimer(); + BP_SetResultState(BPRESULT::NOT_TESTED); // 重置数据状态 ScreenAlwaysOnCtr(OPEN_SCREEN_ALWAYS_ON); // 后期 周期被动状态 需要做区别 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "start detecting"); BP_START(); // 底层接口开启血压 - custom_dbp = 0; - custom_sbp = 0; } // 校准分析状态处理 void BPModel::BPControlCalibratingAnalysis() @@ -595,6 +597,12 @@ namespace OHOS { #ifdef ENABLE_BN02 bp_stop(); +#endif + } + void BPModel::BP_CALIBTATION(void) + { +#ifdef ENABLE_BN02 + bp_set_adjust_data(custom_sbp, custom_dbp); // 校准接口 #endif } void BPModel::BP_GetData(uint8_t *sbp, uint8_t *dbp) @@ -682,7 +690,6 @@ namespace OHOS // time到时的处理 void BPModel::BP_timer_callback_out() { - BP_StopTimer(); // 提前获取各视图实例 @@ -716,7 +723,7 @@ namespace OHOS { if (bpMainView) { - if (1) // 校准结果判断,后期调用接口 + if (1) // 获取到数据,成功 { bpMainView->ChangeView(BPRESULTANALYSISVIEW, BPCALIBRATIONPASSVIEW); int configValue = static_cast(GetCurrentTime()); @@ -724,14 +731,14 @@ namespace OHOS { CalibrationFlag++; #if defined(BOARD_W9) - ConfigModel::GetInstance()->set_condigData_Int(ConfigModel::CONFIGMODEL_ITEM_BP_CALIBRATION_FIRST_TIME, configValue); + ConfigModel::GetInstance()->set_condigData_Int(ConfigModel::CONFIGMODEL_ITEM_BP_CALIBRATION_FIRST_TIME, configValue); #endif } - else //第二次校准成功,校准完成 + else // 第二次校准成功,校准完成 { #if defined(BOARD_W9) - ConfigModel::GetInstance()->set_condigData_Int(ConfigModel::CONFIGMODEL_ITEM_BP_CALIBRATION_SECOND_TIME, configValue); + ConfigModel::GetInstance()->set_condigData_Int(ConfigModel::CONFIGMODEL_ITEM_BP_CALIBRATION_SECOND_TIME, configValue); #endif CalibrationFlag = 0; } @@ -739,7 +746,7 @@ namespace OHOS else { - bpMainView->ChangeView(BPRESULTANALYSISVIEW, BPCALIBRATIONERRORVIEW);//失败只跳转界面,不做任何处理 + bpMainView->ChangeView(BPRESULTANALYSISVIEW, BPCALIBRATIONERRORVIEW); // 失败只跳转界面,不做任何处理 } } BP_SetState(BPState::BP_IDLE); @@ -749,16 +756,26 @@ namespace OHOS // 处理血压检测状态 if (current_state == BPState::BP_DETECTING) { - if (bpDetectionView) - { - bpDetectionView->ChangeView(CALIBRATION_BPVIEW, RESULT_BPVIEW); - } BP_STOP(); // 停止检测 + BP_SetState(BPState::BP_End); // 分析测量结果 if (bp_resullt == BPRESULT::NOT_TESTED) // 未测量到数据 { BP_SetResultState(BPRESULT::TIMEOUT); // 测量超时 } BP_SetState(BPState::BP_IDLE); + + if (bpDetectionView && + (bp_resullt == BPRESULT::HIGH_RESULT || + bp_resullt == BPRESULT::SUCCESS || + bp_resullt == BPRESULT::LOW_RESULT)) // 数据有效 + { + bpDetectionView->ChangeView(CALIBRATION_BPVIEW, RESULT_BPVIEW); // 成功进入结果界面 + } + else + { + bpDetectionView->ChangeView(CALIBRATION_BPVIEW, FAIL_BPVIEW); // 失败进入结果界面 + } + return; } @@ -828,51 +845,52 @@ namespace OHOS EMOTIONTESTANALYSISVIEW); } return; + } - if (current_state == BPState::EMO_ANALYSIS) + if (current_state == BPState::EMO_ANALYSIS) + { + if (emoView) { - if (emoView) - { - EmoPresenter::GetInstance()->ChangeViewOperator(EMOTIONTESTANALYSISVIEW, - EMOTIONTESTRESULTVIEW); - } - BP_SetState(BPState::BP_IDLE); - return; + EmoPresenter::GetInstance()->ChangeViewOperator(EMOTIONTESTANALYSISVIEW, + EMOTIONTESTRESULTVIEW); } + BP_SetState(BPState::BP_IDLE); + return; + } - // 处理ECG相关状态 - if (ecgView) + // 处理ECG相关状态 + if (ecgView) + { + if (current_state == BPState::ECG_REMIND) { - if (current_state == BPState::ECG_REMIND) - { - EcgPresenter::GetInstance()->ChangeViewOperator(ECGTESTREMINDERVIEW, - ECGTESTINGVIEW); - return; - } + EcgPresenter::GetInstance()->ChangeViewOperator(ECGTESTREMINDERVIEW, + ECGTESTINGVIEW); + return; + } - if (current_state == BPState::ECG_MEASURE) - { - EcgPresenter::GetInstance()->ChangeViewOperator(ECGTESTINGVIEW, - ECGTESTANALYSISVIEW); - return; - } + if (current_state == BPState::ECG_MEASURE) + { + EcgPresenter::GetInstance()->ChangeViewOperator(ECGTESTINGVIEW, + ECGTESTANALYSISVIEW); + return; + } - if (current_state == BPState::ECG_ANALYSIS) - { - EcgPresenter::GetInstance()->ChangeViewOperator(ECGTESTANALYSISVIEW, - ECGTESTRESULTVIEW); - return; - } - if (current_state == BPState::ECG_RESULT) - { + if (current_state == BPState::ECG_ANALYSIS) + { + EcgPresenter::GetInstance()->ChangeViewOperator(ECGTESTANALYSISVIEW, + ECGTESTRESULTVIEW); + return; + } + if (current_state == BPState::ECG_RESULT) + { - EcgPresenter::GetInstance()->ChangeViewOperator(ECGTESTRESULTVIEW, - ECGRESETTESTOFSUCCVIEW); - BP_SetState(BPState::BP_IDLE); - } + EcgPresenter::GetInstance()->ChangeViewOperator(ECGTESTRESULTVIEW, + ECGRESETTESTOFSUCCVIEW); + BP_SetState(BPState::BP_IDLE); } } } + // 每秒的处理 void BPModel::BP_timer_callback_proc(uint8_t data) { @@ -896,14 +914,10 @@ namespace OHOS if (Time > 0 && Time < 30) // 一分钟后获取数据 { - BP_GetData(&custom_sbp, &custom_dbp); - if (bp_resullt == BPRESULT::NOT_TESTED && custom_sbp > 0 && custom_dbp > 0) // 检测到数据 + BP_GetData(&lastData.last_check_sbp_value, &lastData.last_check_dbp_value); + if (bp_resullt == BPRESULT::NOT_TESTED && lastData.last_check_sbp_value > 0 && lastData.last_check_dbp_value > 0) // 检测到数据 { - LAST_CHECK_DATA newData; - newData.timestamp = BPModel::GetCurrentTime(); - newData.last_check_sbp_value = custom_sbp; - newData.last_check_dbp_value = custom_dbp; - lastData = newData; + lastData.timestamp = BPModel::GetCurrentTime(); // 获取时间戳 // 测量完成 bp_resullt == BPRESULT::SUCCESS; } @@ -923,26 +937,19 @@ namespace OHOS if (Time > 0 && Time < 30) // 一分钟后获取数据 { - BP_GetData(&custom_sbp, &custom_dbp); - if (custom_sbp > 0 && custom_dbp > 0) // 检测到数据 + BP_GetData(&lastData.last_check_sbp_value, &lastData.last_check_dbp_value); + if (bp_resullt == BPRESULT::NOT_TESTED && lastData.last_check_sbp_value > 0 && lastData.last_check_dbp_value > 0) // 检测到数据 { - LAST_CHECK_DATA newData; - newData.last_check_sbp_value = custom_sbp; // 测试数据 - newData.last_check_dbp_value = custom_dbp; - newData.timestamp = BPModel::GetCurrentTime(); - lastData = newData; + lastData.timestamp = BPModel::GetCurrentTime(); // 获取时间戳 // 测量完成 bp_resullt == BPRESULT::SUCCESS; - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SBP: %d, DBP: %d", custom_sbp, custom_dbp); } } - break; } case BPState::BP_CALIBRATING_SECONDTIME: { - BPSecUnderCalibrationView *view = - BPSecUnderCalibrationView::GetInstance(); + BPSecUnderCalibrationView *view = BPSecUnderCalibrationView::GetInstance(); if (view) { view->UpdateTimeText(data); @@ -950,21 +957,20 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Time: %d", Time); if (Time > 0 && Time < 30) // 一分钟后获取数据 { - BP_GetData(&custom_sbp, &custom_dbp); - if (custom_sbp > 0 && custom_dbp > 0) // 检测到数据 + + BP_GetData(&lastData.last_check_sbp_value, &lastData.last_check_dbp_value); + if (bp_resullt == BPRESULT::NOT_TESTED && lastData.last_check_sbp_value > 0 && lastData.last_check_dbp_value > 0) // 检测到数据 { - LAST_CHECK_DATA newData; - newData.last_check_sbp_value = custom_sbp; // 测试数据 - newData.last_check_dbp_value = custom_dbp; - newData.timestamp = BPModel::GetCurrentTime(); - lastData = newData; + lastData.timestamp = BPModel::GetCurrentTime(); // 获取时间戳 // 测量完成 bp_resullt == BPRESULT::SUCCESS; - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SBP: %d, DBP: %d", custom_sbp, custom_dbp); } } break; } + case BPState::BP_CALIBRATING_ANGLYSIS: + { + } case BPState::ECG_MEASURE: { EcgTestingView *view = EcgTestingView::GetInstance(); @@ -982,7 +988,6 @@ namespace OHOS case BPState::FATIGUE_ANALYSIS: case BPState::ECG_ANALYSIS: case BPState::EMO_ANALYSIS: - case BPState::BP_CALIBRATING_ANGLYSIS: case BPState::ECG_REMIND: case BPState::ECG_RESULT: { diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPUnderCalibrationView.cpp b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPUnderCalibrationView.cpp index ec2cba5c7..f3e89dbe8 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPUnderCalibrationView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPUnderCalibrationView.cpp @@ -171,7 +171,7 @@ namespace OHOS remindLabel->SetTextColor(Color::Red()); InitLabelExt(timeLabel, 165, 400, 300, 35, "timeLabel", STR_S, DEFAULT_VECTOR_FONT_FILENAME, 30); - InitUILabel(timenumLabel, 133, 300, 200, 200, "timenumLabel", "30", DEFAULT_VECTOR_FONT_FILENAME, 100); + InitUILabel(timenumLabel, 133, 300, 200, 200, "timenumLabel", "90", DEFAULT_VECTOR_FONT_FILENAME, 100); InitChartView(); diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectBeginView.cpp b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectBeginView.cpp index a299128b1..5822621f6 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectBeginView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectBeginView.cpp @@ -173,7 +173,7 @@ namespace OHOS remindLabel->SetTextColor(Color::Red()); InitLabelExt(timeLabel, 165, 400, 300, 35, "timeLabel", STR_S, DEFAULT_VECTOR_FONT_FILENAME, 30); - InitUILabel(timenumLabel, 133, 300, 200, 200, "timenumLabel", "30", DEFAULT_VECTOR_FONT_FILENAME, 100); + InitUILabel(timenumLabel, 133, 300, 200, 200, "timenumLabel", "90", DEFAULT_VECTOR_FONT_FILENAME, 100); InitChartView(); diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectionPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectionPresenter.cpp index 78f20cc0f..2019b0543 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectionPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectionPresenter.cpp @@ -59,7 +59,8 @@ namespace OHOS { if (BPCheckState) { - // BPModel::GetInstance()->BP_Stop(); + // 重置状态 + BPModel::GetInstance()->BP_Control(BPState::BP_IDLE); BPCheckState = false; } } diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectionView.cpp b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectionView.cpp index b16a34b50..5a320bcc6 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectionView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/detection/BPDetectionView.cpp @@ -103,17 +103,7 @@ namespace OHOS container_->SetOnDragListener(presenter_); // 切换到第一个界面 - // 校准时间失效或者未校准则先进入校准界面 - if (BPModel::GetInstance()->needMeasure()) // 是否需要校准 - { - // 需要校准进入校准界面 - BPMainView::GetInstance()-> ChangeView(MAX_BPVIEW, BPCALPOSREQVIEW); - } - else - { - //不需要校准则进入测量界面 ChangeView(MAX_BPDECETVIEW, MAIN_BPVIEW); - } // 增加按键监听 RootView::GetInstance()->SetOnKeyActListener(presenter_); diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/en.lang b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/en.lang index 898b14686..441b55529 100755 Binary files a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/en.lang and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/en.lang differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/ui_resource_string.h b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/ui_resource_string.h index d1ef85a65..2e7c9569d 100755 --- a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/ui_resource_string.h +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/ui_resource_string.h @@ -706,7 +706,11 @@ enum UIResourceTextId : uint16_t { STR_CALIB_POSTURE_REQ = 693, STR_ECG = 694, STR_JIUTIAN = 695, - STR_MAX_ID = 696, + STR_LAST_CALIBRATION_TIME = 696, + STR_CALIBRATE = 697, + STR_CALIBRATION_SUGGESTION = 698, + STR_CALIBRATION_PATH = 699, + STR_MAX_ID = 700, }; // UIResourceTextId enum FontLanguageId : uint8_t { 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 537f13466..c84385fa1 100755 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/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/font/en.lang b/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/font/en.lang index 898b14686..441b55529 100644 Binary files a/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/font/en.lang and b/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/font/en.lang differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/font/ui_resource_string.h b/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/font/ui_resource_string.h index d1ef85a65..2e7c9569d 100644 --- a/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/font/ui_resource_string.h +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/font/ui_resource_string.h @@ -706,7 +706,11 @@ enum UIResourceTextId : uint16_t { STR_CALIB_POSTURE_REQ = 693, STR_ECG = 694, STR_JIUTIAN = 695, - STR_MAX_ID = 696, + STR_LAST_CALIBRATION_TIME = 696, + STR_CALIBRATE = 697, + STR_CALIBRATION_SUGGESTION = 698, + STR_CALIBRATION_PATH = 699, + STR_MAX_ID = 700, }; // UIResourceTextId enum FontLanguageId : uint8_t { diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/font/zh.lang b/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/font/zh.lang index 537f13466..c84385fa1 100644 Binary files a/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/font/zh.lang and b/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/font/zh.lang differ diff --git a/tools/language_tool/Language_xml/input_list_en.txt b/tools/language_tool/Language_xml/input_list_en.txt index ffe94e52b..307ef7b33 100755 --- a/tools/language_tool/Language_xml/input_list_en.txt +++ b/tools/language_tool/Language_xml/input_list_en.txt @@ -695,4 +695,8 @@ STR_CALIB_POSTURE_GUIDE$Wear the watch tightly on your left wrist with a one-fin STR_START_CAL$Start calibration. STR_CALIB_POSTURE_REQ$Calibration posture requirements. STR_ECG$ECG -STR_JIUTIAN$jiutian \ No newline at end of file +STR_JIUTIAN$jiutian +STR_LAST_CALIBRATION_TIME$Last Calibration Time +STR_CALIBRATE$Calibrate +STR_CALIBRATION_SUGGESTION$It is recommended to recalibrate every month +STR_CALIBRATION_PATH$Calibration Path: Settings - Blood Pressure Calibration \ No newline at end of file diff --git a/tools/language_tool/Language_xml/input_list_zh.txt b/tools/language_tool/Language_xml/input_list_zh.txt index 1dc2c8c0c..d39ce2985 100755 --- a/tools/language_tool/Language_xml/input_list_zh.txt +++ b/tools/language_tool/Language_xml/input_list_zh.txt @@ -668,7 +668,7 @@ STR_SBP_ELEVATED$收缩压偏高 STR_WARN_THRESH$预警值:XX STR_BP_WARN_CONSULT_DOC$血压达到预警值,请密切关注 自身情况,如有不适或必要时, 请询问医生 STR_MEAS_FAILED$测量失败 -STR_CALIBRATING$测量中... +STR_CALIBRATING$校准中... STR_S$秒 STR_PRESSURE$压力 STR_WEAR_WATCH_DET$请正确佩戴手表检测 @@ -695,4 +695,8 @@ STR_CALIB_POSTURE_GUIDE$请将手表佩戴在左手手腕,手表和手腕之 STR_START_CAL$开始校准 STR_CALIB_POSTURE_REQ$校准姿势要求 STR_ECG$ECG -STR_JIUTIAN$九天大模型 \ No newline at end of file +STR_JIUTIAN$九天大模型 +STR_LAST_CALIBRATION_TIME$上次校准时间 +STR_CALIBRATE$校准 +STR_CALIBRATION_SUGGESTION$建议每个月都重新校准! +STR_CALIBRATION_PATH$校准路径:设置-血压校准 \ No newline at end of file diff --git a/tools/language_tool/Language_xml/language_custom.xlsx b/tools/language_tool/Language_xml/language_custom.xlsx index 5c792fc56..93b031acc 100755 Binary files a/tools/language_tool/Language_xml/language_custom.xlsx and b/tools/language_tool/Language_xml/language_custom.xlsx differ diff --git a/tools/language_tool/Language_xml/language_en.xml b/tools/language_tool/Language_xml/language_en.xml index 69bbdccd7..2267310cc 100755 --- a/tools/language_tool/Language_xml/language_en.xml +++ b/tools/language_tool/Language_xml/language_en.xml @@ -697,4 +697,8 @@ + + + + diff --git a/tools/language_tool/Language_xml/language_zh.xml b/tools/language_tool/Language_xml/language_zh.xml index 9020cca1e..f796b0c62 100755 --- a/tools/language_tool/Language_xml/language_zh.xml +++ b/tools/language_tool/Language_xml/language_zh.xml @@ -669,7 +669,7 @@ - + @@ -697,4 +697,8 @@ + + + + diff --git a/tools/language_tool/font/en.lang b/tools/language_tool/font/en.lang index 898b14686..441b55529 100755 Binary files a/tools/language_tool/font/en.lang and b/tools/language_tool/font/en.lang differ diff --git a/tools/language_tool/font/ui_resource_string.h b/tools/language_tool/font/ui_resource_string.h index d1ef85a65..2e7c9569d 100755 --- a/tools/language_tool/font/ui_resource_string.h +++ b/tools/language_tool/font/ui_resource_string.h @@ -706,7 +706,11 @@ enum UIResourceTextId : uint16_t { STR_CALIB_POSTURE_REQ = 693, STR_ECG = 694, STR_JIUTIAN = 695, - STR_MAX_ID = 696, + STR_LAST_CALIBRATION_TIME = 696, + STR_CALIBRATE = 697, + STR_CALIBRATION_SUGGESTION = 698, + STR_CALIBRATION_PATH = 699, + STR_MAX_ID = 700, }; // UIResourceTextId enum FontLanguageId : uint8_t { diff --git a/tools/language_tool/font/zh.lang b/tools/language_tool/font/zh.lang index 537f13466..c84385fa1 100755 Binary files a/tools/language_tool/font/zh.lang and b/tools/language_tool/font/zh.lang differ