ExerciseClass type = GetSportId();
// 开启对应的运动
TraingCardPresenter::GetInstance()->OpenSensor(type);
- // 设置为手表开启运动
- SetSportOpenWay(false);
+
+ TraingCardPresenter::GetInstance()->ControlSensor(ExerciseState::Start);
+ TraingModel::GetInstance()->SetSportOpenWay(false); // 运动识别由手表开启,非用户点击
+ //开启心率
+ TraingModel::GetInstance()->start_training_heart();
+ // 仅需要GPS的运动才开启GPS定时器(与TraingNomalPresenter::OnStart一致)
+ if (TraingModel::GetInstance()->IsNeedGPS(TraingModel::GetInstance()->GetSportEvent())) {
+ #if defined(SUPPORT_GNSS)
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "该运动需要GPS,开启gps定时器,频率:2秒/点");
+ TraingModel::GetInstance()->gnss_start_timer(2 * 1000); // 2秒一个GPS点
+ #endif
+ } else {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "该运动不需要GPS,不开启GPS定时器");
+ }
+ // 快捷训练都属于健身类
+ // 运动识别,跑步,走路,骑行,划船机,椭圆机,都属于健身类
+ SetSportType(Exercisetype::FITNESS);
}
/* -------------------------------------------------------------------------- */