From 8bfeb05f8a5b0d0b5c5661bded2ba49b96b7a109 Mon Sep 17 00:00:00 2001 From: Caisking <3449750381@qq.com> Date: Mon, 29 Apr 2024 20:13:37 +0800 Subject: [PATCH] =?utf8?q?=E6=9B=B4=E6=96=B0=E8=BF=90=E5=8A=A8=E7=8A=B6?= =?utf8?q?=E6=80=81=E5=8D=8F=E8=AE=AE=E5=8F=91=E9=80=81=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../wearable/fd230app/nativeui/traing/include/TraingModel.h | 2 +- .../wearable/fd230app/nativeui/traing/src/TraingModel.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingModel.h b/code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingModel.h index 6a396a41b..2c20edd33 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingModel.h +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingModel.h @@ -287,7 +287,7 @@ namespace OHOS bool Gettagstuats{false}; // 训练达标标志位 bool Startstate{false}; // 开始训练标志位 bool Endstate{false}; // 结束训练标志位 - bool Openingway{false}; // 运动开启方式 + bool Openingway{false}; // 运动开启方式 [0 手表 1 app] bool MomentumFlag{false}; // 训练量达标标志位 bool Openstate{false}; // 运动是否开始 diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingModel.cpp index f5fee7eb3..e47768f14 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingModel.cpp @@ -247,7 +247,8 @@ namespace OHOS /*设置运动状态*/ void TraingModel::SetSportState(ExerciseState state) { - if (state != ExerciseState::General) + /*运动开始并且是app发起的运动*/ + if (state != ExerciseState::General && Openingway == true) { sendtraningstatedata(static_cast(state), sportdata->duration); } -- 2.17.1