设置运动快捷方式
每次选择最多8个运动模式设置
功能表
[IDOGetDeviceFuncBluetoothModel isHaveMovment]
运动快捷方式模型说明
- IDOSetSportShortcutInfoBluetoothModel
参数 | 说明 | 备注 |
---|---|---|
isWalk | 走路 | bool |
isRun | 跑步 | bool |
isByBike | 骑自行车 | bool |
isOnFoot | 步行 | bool |
isSwim | 游泳 | bool |
isMountainClimbing | 羽毛球 | bool |
isOther | 其他 | bool |
isFitness | 健身 | bool |
isSpinning | 动感单车 | bool |
isEllipsoid | 橄榄球 | bool |
isTreadmill | 跑步机 | bool |
isSitUp | 仰卧起坐 | bool |
isPushUp | 俯卧撑 | bool |
isDumbbell | 哑铃 | bool |
isWeightlifting | 举重 | bool |
isBodybuildingExercise | 体操 | bool |
isYoga | 瑜伽 | bool |
isRopeSkipping | 跳绳 | bool |
isTableTennis | 乒乓球 | bool |
isBasketball | 篮球 | bool |
isFootball | 足球 | bool |
isVolleyball | 排球 | bool |
isTennis | 网球 | bool |
isGolf | 高尔夫 | bool |
isBaseball | 棒球 | bool |
isSkiing | 滑雪 | bool |
isRollerSkating | 滑旱冰 | bool |
isDance | 跳舞 | bool |
命令代码
Objc:
IDOSetSportShortcutInfoBluetoothModel * model = [IDOSetSportShortcutInfoBluetoothModel currentModel];
[IDOFoundationCommand setSportModeSelectCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//设置成功
}else if (errorCode == 6) {
//设备不支持
}else {
//设置失败
}
}];
Swift:
let model = IDOSetSportShortcutInfoBluetoothModel.current();
IDOFoundationCommand.setSportModeSelect(model) { (errorCode) in
if errorCode == 0 {
//设置成功
}else if errorCode == 6{
//设备不支持此方法
}else {
//设置错误
}
};