Set GPS information
Function table
__IDO_FUNCTABLE__.funcTable19Model.gps
Description of GPS Information Model
- IDOSetGpsConfigInfoBluetoothModel
| Parameter | Description | Remark |
|---|---|---|
| startMode | Boot mode | 0x01:Cold start,0x02:Hot Start |
| gsopOperationMode | Operating mode | 1:Normal;2:Low power consumption;4:Balance,5:1PPS |
| gsopCycleMs | Positioning cycle | Default 1000 milliseconds |
| gnsValue | Positioning star mode | 1:GPS,2:GLONASS,3:1GPS+GLONASS |
| year | (UTC)Year | int |
| month | (UTC)Month | int |
| day | (UTC)Day | int |
| hour | (UTC)Hour | int |
| minute | (UTC)Minute | int |
| second | (UTC)Second | int |
Command code
Objc:
IDOSetGpsConfigInfoBluetoothModel * model = [IDOSetGpsConfigInfoBluetoothModel currentModel];
[IDOFoundationCommand setGpsInfoCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Set successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetGpsConfigInfoBluetoothModel.current();
IDOFoundationCommand.setGpsInfo(model) { (errorCode) in
if errorCode == 0 {
//Set successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};