/*分析activity extra info数据*/
void TraingModel::AnalysisExtraData(
cywee_activity_result_extre_info_t *cyweeInfo) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "extra data %d %d %d %d",
+
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[apc:%d fpc:%d cdc:%d std:%d]",
cyweeInfo->avg_pace, cyweeInfo->max_pace,
cyweeInfo->avg_step_freq, cyweeInfo->avg_step_len);
+ //平均配速
if (cyweeInfo->avg_pace != 0) {
sportdata->apc = cyweeInfo->avg_pace;
}
+ //最快配速
if (cyweeInfo->max_pace != 0) {
- sportdata->fpc = cyweeInfo->max_pace;
+ sportdata->fpc =cyweeInfo->max_pace;
}
+ //平均步频
if (cyweeInfo->avg_step_freq != 0) {
sportdata->cdc = cyweeInfo->avg_step_freq;
}
+ //平均步长
if (cyweeInfo->avg_step_len != 0) {
sportdata->std = cyweeInfo->avg_step_len * 100; // 前者cm 后者m
}
}
}
-// 每10秒进行配速和心率数据存储
+// 每5秒进行配速和心率数据存储
void TraingModel::StoreDataIfMinutePassed() {
if (sportdata->duration % 5 == 0) {
uint32_t timestamp;