设置单位命令
功能表
默认支持
单位模型说明
- IDOSetUnitInfoBluetoothModel
参数 | 说明 | 备注 |
---|---|---|
distanceUnit | 距离单位 | 0x00:无效,0x01:km,0x02:mi |
weightUnit | 重量单位 | 0x00:无效,0x01:kg,0x02:lb,0x03:英石 |
tempUnit | 温度单位 | 0x00:无效,0x01:°C,0x02:°F |
languageUnit | 语言单位 | 无效:0,中文:1,英文:2,法语:3,德语:4,意大利语:5, 西班牙语:6,日语:7, 波兰语:8,捷克语:9,罗马尼亚:10, 立陶宛语:11,荷兰语:12,斯洛文尼亚:13, 匈牙利语:14,俄罗斯语:15, 乌克兰语:16,斯洛伐克语:17,丹麦语:18, 克罗地亚:19,印尼语:20, 韩语:21,印地语:22,葡萄牙语:23,土耳其:24, 泰国语:25, 越南语:26,缅甸语:27,菲律宾语:28,繁体中文:29,希腊语:30, 阿拉伯语:31,瑞典语:32,芬兰语:33,波斯语:34,挪威语:35 功能表判断 |
strideWalk | 走路步伐 | 根据男性换算,默认值:72cm |
strideRun | 跑步步伐 | 根据男性换算,默认值:90cm |
strideGps | gps校准步长 | 0x00:无效,0x01:开,0x02:关 |
timeUnit | 时间单位 | 0x00:无效,0x01:24小时制,0x02:12小时制 |
weekStart | 周的开始日 | 星期日:0x01,星期一:0x00,星期六:0x03 |
calorieUnit | 卡路里单位 | 0x00 :无效; 0x01 :千卡;0x02 : 大卡; 0x03 : 千焦 |
swimPoolUnit | 泳池单位 | 0x00 :无效; 0x01 :米;0x02 : 码 |
cyclingUnit | 骑行单位 | 0x00 : 无效;0x01 : km 公里 0x02 : 英里 |
walkRunUnit | 步行或者跑步单位 | 0x00 : 无效;0x01 : km 公里 0x02 : 英里 |
命令代码
Objc:
IDOSetUnitInfoBluetoothModel * model = [IDOSetUnitInfoBluetoothModel currentModel];
[IDOFoundationCommand setUnitCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//设置成功
}else if (errorCode == 6) {
//设备不支持
}else {
//设置失败
}
}];
Swift:
let model = IDOSetUnitInfoBluetoothModel.current();
IDOFoundationCommand.setUnit(model) { (errorCode) in
if errorCode == 0 {
//设置成功
}else if errorCode == 6{
//设备不支持此方法
}else {
//设置错误
}
};