Set unit command

Description of Unit Model

  • IDOSetUnitInfoBluetoothModel
Parameter Description Remark
distanceUnit Distance unit 0x00:Invalid,0x01:km,0x02:mi
weightUnit Weight unit 0x00:Invalid,0x01:kg,0x02:lb,0x03:Stone
tempUnit 0x00:Invalid,0x01:°C,0x02:°F
languageUnit Language unit Invalid:0,Chinese:1,English:2,French:3,German:4,Italian:5,
Spanish:6,Japanese:7, Polish:8,Czech: 9, Romanian: 10,
Lithuanian: 11, Dutch: 12, Slovenian: 13, Hungarian: 14, Russian: 15,
Ukrainian: 16, Slovak: 17, Danish: 18, Croatia: 19, Indonesian: 20,
Korean: 21, Hindi: 22, Portuguese: 23, Turkey: 24, Thai: 25,
Vietnamese: 26, Burmese: 27, Filipino: 28, Traditional Chinese: 29, Greek: 30,
Arabic: 31, Swedish: 32, Finnish: 33, Persian: 34, Norwegian:35
Function table judgment
strideWalk Walking pace According to male conversion, the default value:72cm
strideRun Running pace According to male conversion, the default value:90cm
strideGps gps calibration step size 0x00:Invalid,0x01:on,0x02:off
timeUnit Time unit 0x00:Invalid,0x01:24 hour clock,0x02:12 hour clock
weekStart Start day of the week Sunday:0x01,Monday:0x00,Saturday:0x03
calorieUnit Calorie Unit 0x00 :Invalid; 0x01 :Kcal;0x02 : Kcal; 0x03 : Kilojoule
swimPoolUnit Pool unit 0x00 :Invalid; 0x01 :meter;0x02 : Yard
cyclingUnit Riding unit 0x00 : Invalid;0x01 : km Kilometer 0x02 : Mile
walkRunUnit Walking or running unit 0x00 : Invalid;0x01 : km Kilometer 0x02 : Mile

Command code

Objc:

IDOSetUnitInfoBluetoothModel * model = [IDOSetUnitInfoBluetoothModel currentModel];
[IDOFoundationCommand setUnitCommand:model
                            callback:^(int errorCode) {
    if (errorCode == 0) {
       //Set successfully
    }else if (errorCode == 6) {
      //Device not supported
    }else {
      //Setup failed
    }
}];

Swift:

let model = IDOSetUnitInfoBluetoothModel.current();
IDOFoundationCommand.setUnit(model) { (errorCode) in
     if errorCode == 0 {
        //Set successfully
     }else if errorCode == 6{
        //Device does not support this method
     }else {
       //Wrong setting
     }
};
Copyright © 2015-2020 IDO. All rights reserved. all right reserved,powered by GitbookModify Date: 2023-12-18 10:04:13

results matching ""

    No results matching ""