V3多运动数据交互

功能表:syncV3ActivityExchangeData 【syncExchangeDataReplyAddRealTimeSpeedPaceV3,setSupportSportPlan,setSupportExchangeSetGpsCoordinates】

Flutter示例:

/// app发起数据v3交换过程事件号
exchangeAppV3Ing(
  evtBase: _VBusEvtBase.base_app_set,
  evtType: _VBusEvtType.func_v3_activity_data_exchange),

/// app发起数据v3交换过程
libManager.send(evt: CmdEvtType.exchangeAppV3Ing, json: jsonEncode(json));

App下发的json字段:

字段名 字段类型 字段说明
version int 协议版本号 默认0
固件开启功能表syncExchangeDataReplyAddRealTimeSpeedPaceV3时version=16
固件开启功能表setSupportSportPlan时version=32
type int 运动类型
signal_flag int 0 :表示信号弱
1 :表示信号强
distance int app距离
单位米
app信号强的时候ble使用app的距离数据计算
app信号弱的时候ble不使用app的数据,app显示使用手环的数据
real_time_speed int app计算显示实时配速,预留
单位km/h,100倍
duration int 持续时间 预留
单位米
calories int 卡路里 预留
单位Kcal
gps_info_count int gps坐标个数,最大支持下发30
功能表setSupportExchangeSetGpsCoordinates开启时支持
gps 集合 gps坐标详情,latitude&longitude的集合
最大支持下发30组
功能表setSupportExchangeSetGpsCoordinates开启时支持
字段名 字段类型 字段说明
latitude int 纬度
下发的数值 x10^6
正数北纬 负数南纬
longitude int 经度
下发的数值 x10^6
正数东经 负数西经

示例:

{
  "version":0,
  "type":31,
  "signal_flag":0,
  "distance":0,
  "real_time_speed":0,
  "duration":0,
  "calories":0,
  "gps_info_count" : 2,
  "gps" : [
    {
      "latitude" :22543100,
      "longitude" :114057800
    },
    {
      "latitude" :23129100,
      "longitude" :113264400
    }
  ]
}

App收到的json字段

字段名 字段类型 字段说明
version int 协议版本号
0:基础版本
16:biggerfive定制项目
需要固件开启syncExchangeDataReplyAddRealTimeSpeedPaceV3
32:新增跑步计划数据 需要固件开启功能表setSupportSportPlan时version=32
type int 运动类型
act_type为0有效
day int 数据时间 日
hour int 数据时间 时
minute int 数据时间 分
second int 数据时间 秒
heart_rate int 心率数据
单位:bpm
distance int 距离
单位根据单位设置的单位显示
real_time_speed int 实时速度,单位km/h,扩大100倍
km_speed int 实时公里配速 单位s/公里
real_time_calories int 动态卡路里
steps int 步数
swim_posture int 主泳姿
status int 状态
0:无效
1:开始
2:手动暂停
3:结束
4:自动暂停
duration int 持续时间 秒钟数据
real_time_speed_pace int 实时的配速 单位秒
5秒使用滑动平均,第5秒使用1-5秒数据,第6秒使用2-6秒数据。第1-4秒不显示配速或速度
需要固件开启功能表syncExchangeDataReplyAddRealTimeSpeedPaceV3
功能表未开启返回0
te int 有氧训练效果等级 单位无 范围 0-50 扩大10倍传输
需要固件开启功能表syncExchangeDataReplyAddRealTimeSpeedPaceV3
功能表未开启返回0
tean int 无氧运动训练效果等级 单位无 范围 0-50 扩大10倍传输
需要固件开启功能表syncExchangeDataReplyAddRealTimeSpeedPaceV3
功能表未开启返回0
action_type int 动作类型
1快走
2慢跑
3中速跑
4快跑
5结束课程运动 (还要等待用户是否有自由运动)
6课程结束后自由运动(此字段当operate为5起作用)
运动累积时间=课程内训练时间+课程结束后计时
需要固件开启功能表setSupportSportPlan 功能表未开启返回0
count_hour int action_type = 1—5时,该字段是运动倒计时时间(注:时间递减)
action_type = 6时,该字段是课程结束后计时(注:时间递增)
需要固件开启功能表setSupportSportPlan 功能表未开启返回0
count_minute int action_type = 1—5时,该字段是运动倒计时时间(注:时间递减)
action_type = 6时,该字段是课程结束后计时(注:时间递增)
需要固件开启功能表setSupportSportPlan 功能表未开启返回0
count_second int action_type = 1—5时,该字段是运动倒计时时间(注:时间递减)
action_type = 6时,该字段是课程结束后计时(注:时间递增)
需要固件开启功能表setSupportSportPlan 功能表未开启返回0

示例:

{
    "version":0,
    "type":0,
    "day":0,
    "hour":0,
    "minute":0,
    "second":0,
    "heart_rate":0,
    "distance":0,
    "real_time_speed":0,
    "km_speed":0,
    "real_time_calories":0,
    "steps":0,
    "swim_posture":0,
    "status":0,
    "duration":0,
    "real_time_speed_pace":0,
    "te":0,
    "tean":0,
    "action_type":0,
    "count_hour":0,
    "count_minute":0,
    "count_second":0
}
Copyright © 2023-2024 IDO. All rights reserved. all right reserved,powered by Gitbook修订时间: 2026-04-07 16:03:39

results matching ""

    No results matching ""