offset = 0;
break;
}
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " offset %d id %d", offset, id);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "编译id offset %d id %d", offset, id);
return id - offset;
}
Startstate = true;
Endstate = false; // 确保"开始"和"结束"状态互斥
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "开始运动");
+ //打印目前运动配置项
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "*******************************");
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "开始运动");
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "sportType:%d", sportdata->sportType);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "sportId:%d", sportdata->sportId);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "sportTagType:%d", sportdata->sportTagType);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "sportTag:%d", sportdata->tag);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "*******************************");
+
sport_start_data_timer(300); //开启数据获取定时器 刷新频率是300ms
Trainingdata data;
data.src = Openingway;
data.bt = static_cast<uint32_t>(sportdata->sportType);
- data.ty = static_cast<uint32_t>(
- GetBleSportId(sportdata->sportType, sportdata->sportId));
+ data.ty = static_cast<uint32_t>(GetBleSportId(sportdata->sportType, sportdata->sportId));
data.st = static_cast<uint32_t>(sportdata->starttime);
data.sp = static_cast<uint32_t>(sportdata->endtime);
data.tgt = static_cast<uint32_t>(sportdata->sportTagType);
if (gps_timer_count == 2) {
#if defined(SUPPORT_GNSS)
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "开启gps");
- gnss_start();
+ // gnss_start();
#endif
}
#if defined(SUPPORT_GNSS)
cJSON_AddNumberToObject(itemJSON, "spc", data->spc);
cJSON_AddNumberToObject(itemJSON, "std", data->std);
cJSON_AddNumberToObject(itemJSON, "cdc", data->cdc);
-
cJSON_AddItemReferenceToArray(data_arryJSON, itemJSON);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"*******************************");
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"src:%d",data->src);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"bt:%d",data->bt);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"ty:%d",data->ty);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"st:%d",data->st);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"sp:%d",data->sp);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"tgt:%d",data->tgt);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"tg:%d",data->tg);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"pg:%d",data->pg);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"du:%d",data->du);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"ca:%d",data->ca);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"di:%d",data->di);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"hr:%d",data->hr);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"stp:%d",data->stp);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"ti:%d",data->ti);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"cir:%d",data->cir);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"alt:%d",data->alt);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"apc:%d",data->apc);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"fpc:%d",data->fpc);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"spc:%d",data->spc);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"std:%d",data->std);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"cdc:%d",data->cdc);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"*******************************");
free(data);
data = NULL;
} else {
if(data!=NULL)
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"%d,%d\r\n",timetamp,data->st);
+ // 打印data数据
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"*******************************");
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"src:%d",data->src);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"bt:%d",data->bt);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"ty:%d",data->ty);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"st:%d",data->st);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"sp:%d",data->sp);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"tgt:%d",data->tgt);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"tg:%d",data->tg);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"pg:%d",data->pg);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"du:%d",data->du);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"ca:%d",data->ca);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"di:%d",data->di);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"hr:%d",data->hr);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"stp:%d",data->stp);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"ti:%d",data->ti);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"cir:%d",data->cir);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"alt:%d",data->alt);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"apc:%d",data->apc);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"fpc:%d",data->fpc);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"spc:%d",data->spc);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"std:%d",data->std);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"cdc:%d",data->cdc);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"*******************************");
int time_error= timetamp>data->st ? timetamp-data->st:data->st-timetamp;
if(time_error<=2)
{
switch (id)
{
case 0x49:
- json_format=struct_to_json_buf_malloc_(day);
+ json_format=struct_to_json_buf_malloc(day);
break;
case 0x01:
json_format=struct_to_json_buf_malloc_Alarm();
else
{
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"%d %d %d %d\r\n",data_len,surplus_len,pack_id,pack);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"%d %d %d %d\r\n",data_len,surplus_len,pack_id,pack);
ble_data_type type_={0x01,id,data_len,pack,pack_id};
send_big_data(type_,json_format+offset,surplus_len);
//send_big_data(1,json_format+offset,surplus_len,data_len,pack_id,pack,id,1);
uapi_dev_runtime_set_goal_storage_status(0);
break;
case 0x49://同步基础训练历史数据
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"同步基础训练历史数据 目前存储状态:%d",uapi_dev_runtime_get_train_storage_status());
if(uapi_dev_runtime_get_train_storage_status())
{
ble_reply_cmdarr(SYN_BASIC_TRANIN_HISTORY_DATA_CMD,NULL,0);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"同步基础训练历史数据 失败");
return;
}
num=482;
}
uapi_dev_runtime_set_train_storage_status(1);
- Send_json_Data_Cmd(data[0],num,0x49);
+ Send_json_Data_Cmd(data[0],num,0x49);
uapi_dev_runtime_set_train_storage_status(0);
break;
case 0x01://同步闹钟