From: xue <2144439972@qq.com> Date: Fri, 26 Jun 2026 02:02:47 +0000 (+0800) Subject: 优化结果会黑屏的bug X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=fa715c79d5041c5b89538cdf977b6b59f5a1da8d;p=mirrors%2FFD230.git 优化结果会黑屏的bug --- diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/ecg/src/ECGMainView.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/ecg/src/ECGMainView.cpp index 2136d8086..d5086a757 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/ecg/src/ECGMainView.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/ecg/src/ECGMainView.cpp @@ -243,10 +243,15 @@ void ECGMainView::ChangeView(int16_t hideView, int16_t showView, int16_t type) { container_->Invalidate(); return; } - if (hideView != MAX_ECGVIEW) { - if (hideView >= MAX_ECGVIEW || group_[hideView] == nullptr) { - return; - } + + if (!ClickFunc(showView, type)) { + return; + } + + group_[showView]->SetVisible(true); + currentViewId_ = showView; + + if (hideView != MAX_ECGVIEW && hideView < MAX_ECGVIEW && group_[hideView] != nullptr) { if (hideView == ECG_MEASURING_VIEW && measuringView_ != nullptr) { measuringView_->StopMeasurement(); ECGMainPresenter::GetInstance()->StopMeasureTimer(); @@ -262,11 +267,7 @@ void ECGMainView::ChangeView(int16_t hideView, int16_t showView, int16_t type) { } group_[hideView]->SetVisible(false); } - if (!ClickFunc(showView, type)) { - return; - } - group_[showView]->SetVisible(true); - currentViewId_ = showView; + if (showView == ECG_MEASURING_VIEW && measuringView_ != nullptr) { measuringView_->ResetMeasurement(); ECGMainPresenter::GetInstance()->OnEnterMeasuringView(); diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/ecg/src/ECGMeasureResultView.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/ecg/src/ECGMeasureResultView.cpp index ffb0d4b52..6de24cd2d 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/ecg/src/ECGMeasureResultView.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/ecg/src/ECGMeasureResultView.cpp @@ -111,7 +111,7 @@ UIViewGroup *ECGMeasureResultView::InitView() { resultLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); InitLabelExt(noteLabel_, 0, 412, 466, 35, "ecg_result_note", STR_BP_RESULT_REF, - DEFAULT_VECTOR_FONT_FILENAME, 30); + DEFAULT_VECTOR_FONT_FILENAME, 24); noteLabel_->SetTextColor(Color::GetColorFromRGBA(0x99, 0x99, 0x99, 0xff)); noteLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/ecg/src/ECGModel.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/ecg/src/ECGModel.cpp index bc5a21fbe..c9c6ba1e0 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/ecg/src/ECGModel.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/ecg/src/ECGModel.cpp @@ -226,6 +226,7 @@ uint8_t ECGModel::GetAfibResult() const { return resultAfib_; } ECGResultType ECGModel::GetResultType() const { return MapAfibToResultType(resultAfib_); } +//保存测量记录 bool ECGModel::SaveMeasureRecord(uint8_t bpm, uint8_t afibResult) { uint32_t now = 0; if (uapi_get_timestampe_ss(&now) != ERRCODE_SUCC) {