V3 settings, query sports reminders
Function table: supportSportingRemindSetting
Flutter example:
/// Sports reminder settings
setSportingRemindSetting(
evtBase: _VBusEvtBase.base_app_set,
evtType: _VBusEvtType.vbus_evt_app_set_sporting_remind),
/// Sports reminder settings
libManager.send(evt: CmdEvtType.setSportingRemindSetting, json: jsonEncode(json));
JSON fields sent by App:
Field name | Field type | Field description |
---|---|---|
version | int | Protocol version number 0 |
operate | int | Operation 0: Invalid 1: Set 2: Query |
setting_item_num | int | Operation 'set' is valid, the maximum number is 48 |
sport_type_num | int | Operation 'get' is valid, the maximum number is 48 |
setting_item | sport_remind_setting_item [] | Reminder setting details during exercise, operation 'set' is valid |
sport_type | int[] | Get the reminder settings during exercise for which types of sports, operation 'get' is valid |
sport_remind_setting_item: | Field name | Field type | Field description | | ----------------- | -------- | ------------------------------------------------------------ | | sport_type | int | Sport type | | dis_remind | dis_remind | Distance reminder | | pace_remind | pace_remind | Pace reminder | | hr_remind | hr_remind | Heart rate reminder | | step_freq_remind | step_freq_remind | Step frequency reminder |
dis_remind: | Field name | Field type | Field description | | ----------------- | -------- | ------------------------------------------------------------ | | is_on | int | Distance reminder switch true: on, flase: off | | is_metric | int | Is it metric true: metric unit (km); false: imperial unit (mi) | | goal_val_org | long | Target distance original value * 1000, without unit, for metric to imperial conversion |
pace_remind: | Field name | Field type | Field description | | ----------------- | -------- | ------------------------------------------------------------ | | is_on | int | Pace reminder switch true: on, flase: off | | is_metric | int | Is it metric true: metric unit (s/km); false: imperial unit (s/mi) | | slow_threshold_org | long | The original value of the slowest pace in the pace range, without units, for metric-imperial conversion | | fast_threshold_org | long | The original value of the fastest pace in the pace range, without units, for metric-imperial conversion |
hr_remind: | Field name | Field type | Field description | | ----------------- | -------- | ------------------------------------------------------------ | | is_on | int | Heart rate reminder switch true: on, flase: off | | min_threshold | long | Heart rate range minimum threshold | | max_threshold | long | Heart rate range maximum threshold |
step_freq_remind: | Field name | Field type | Field description | | ----------------- | -------- | ------------------------------------------------------------ | | is_on | int | Step frequency reminder switch true: on, flase: off | | min_threshold | long | Step frequency range minimum threshold | | max_threshold | long | Maximum threshold of cadence range |
Example:
{
"version": 0,
"operate": 1,
"setting_item_num": 2,
"sport_type_num": 0,
"sport_type":[1001],
"setting_item": [{
"sport_type": 1001,
"dis_remind": {
"is_on": true,
"is_metric": true,
"goal_val_org": 10000
},
"pace_remind": {
"is_on": true,
"is_metric": false,
"slow_threshold_org": 300,
"fast_threshold_org": 200
},
"hr_remind": {
"is_on": false,
"min_threshold": 60,
"max_threshold": 120
},
"step_freq_remind": {
"is_on": true,
"min_threshold": 160,
"max_threshold": 180
}
}]
}
JSON fields received by App:
Field name | Field type | Field description |
---|---|---|
version | int | Protocol version number 0 |
err_code | int | 0 success Non-0 failure |
operate | int | Operation 0: Invalid 1: Set 2: Query |
setting_item_num | int | Operation 'Set' is valid, the maximum number is 48 |
sport_type_num | int | Operation 'Get' is valid, the maximum number is 48 |
setting_item | sport_remind_setting_item [] | Reminder setting details during exercise, operation 'Set' is valid |
sport_type | int | Get the reminder settings during exercise for which types of sports, operation 'Get' is valid |
sport_remind_setting_item: | Field name | Field type | Field description | | ----------------- | -------- | ------------------------------------------------------------ | | sport_type | int | sport type | | dis_remind | dis_remind | distance reminder | | pace_remind | pace_remind | pace reminder | | hr_remind | hr_remind | heart rate reminder | | step_freq_remind | step_freq_remind | cadence reminder |
dis_remind: | field name | field type | field description | | ----------------- | -------- | ------------------------------------------------------------ | | is_on | int | distance reminder switch true: on, flase: off | | is_metric | int | whether it is metric true: metric unit (km); false: imperial unit (mi) | | goal_val_org | long | original value of goal distance * 1000, excluding units, used for metric to imperial conversion |
pace_remind: | field name | Field Type | Field Description | | ----------------- | -------- | ------------------------------------------------------------ | | is_on | int | Pace reminder switch true: on, flase: off | | is_metric | int | Is it metric true: metric unit (s/km); false: imperial unit (s/mi) | | slow_threshold_org | long | The slowest pace original value of the pace range, without unit, for metric-imperial conversion | | fast_threshold_org | long | The fastest pace original value of the pace range, without unit, for metric-imperial conversion |
hr_remind: | Field Name | Field Type | Field Description | | ----------------- | -------- | ------------------------------------------------------------ | | is_on | int | Heart rate reminder switch true: on, flase: off | | min_threshold | long | Heart rate range minimum threshold | | max_threshold | long | Heart rate range maximum threshold |
step_freq_remind: | Field name | Field type | Field description | | ----------------- | -------- | ------------------------------------------------------------ | | is_on | int | Step frequency reminder switch true: on, flase: off | | min_threshold | long | Minimum threshold of step frequency range | | max_threshold | long | Maximum threshold of step frequency range |
Example:
{
"version": 0,
"err_code": 0,
"operate": 1,
"setting_item_num": 2,
"sport_type_num": 0,
"sport_type":[1001],
"setting_item": [{
"sport_type": 1001,
"dis_remind": {
"is_on": true,
"is_metric": true,
"goal_val_org": 10000
},
"pace_remind": {
"is_on": true,
"is_metric": false,
"slow_threshold_org": 300,
"fast_threshold_org": 200
},
"hr_remind": {
"is_on": false,
"min_threshold": 60,
"max_threshold": 120
},
"step_freq_remind": {
"is_on": true,
"min_threshold": 160,
"max_threshold": 180
}
}]
}