isspecialsport_ = false;
break;
}
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " 特殊训练 %d 训练项 %d", isspecialsport_,sportId_);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " 特殊训练 %d 训练项 %d",
+ isspecialsport_, sportId_);
}
bool TraingModel::GetIsSpecial() { return isspecialsport_; }
printf("SetTimestamp::time:%u \r\n", time);
sportdata->starttime = time;
+
sportdata->sportType = sportType_; // 训练类型
sportdata->sportId = sportId_;
IsSpecialSport(sportdata->sportId); // 配置运动特殊性状态
// 设置训练 runtime 为 0 训练结束
uapi_dev_runtime_set_train_status(0);
- // sportdata->endtime = time;
+ sportdata->endtime = time;
SetEndTime();
}
// 设置训练目标类型以及训练目标
void TraingModel::SetSportTag(ExerciseTag tagtpye, int tag) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "设置目标 tagtpye[%d] tag[%d]", tagtpye, tag);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "设置目标 tagtpye[%d] tag[%d]",
+ tagtpye, tag);
sportTagType_ = tagtpye;
sportTag_ = tag;
}
// 检查并发送实时数据
void TraingModel::SendLiveDataIfNecessary() {
- // 检查自动获取的配置
- if (user_autoget) {
+ // 检查自动获取的配置 app发起
+ if (user_autoget && Openingway) {
// 发送实时数据
if (g_motionTimes % user_freq == 0) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SendLiveData is OK\r\n");