设置GPS信息
功能表
__IDO_FUNCTABLE__.funcTable19Model.gps
GPS信息模型说明
- IDOSetGpsConfigInfoBluetoothModel
| 参数 | 说明 | 备注 |
|---|---|---|
| startMode | 启动模式 | 0x01:冷启动,0x02:热启动 |
| gsopOperationMode | 操作模式 | 1:正常;2:低功耗;4:Balance,5:1PPS |
| gsopCycleMs | 定位周期 | 默认1000毫秒 |
| gnsValue | 定位星mode | 1:GPS,2:GLONASS,3:1GPS+GLONASS |
| year | (UTC)年 | int |
| month | (UTC)月 | int |
| day | (UTC)日 | int |
| hour | (UTC)时 | int |
| minute | (UTC)分 | int |
| second | (UTC)秒 | int |
命令代码
Objc:
IDOSetGpsConfigInfoBluetoothModel * model = [IDOSetGpsConfigInfoBluetoothModel currentModel];
[IDOFoundationCommand setGpsInfoCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//设置成功
}else if (errorCode == 6) {
//设备不支持
}else {
//设置失败
}
}];
Swift:
let model = IDOSetGpsConfigInfoBluetoothModel.current();
IDOFoundationCommand.setGpsInfo(model) { (errorCode) in
if errorCode == 0 {
//设置成功
}else if errorCode == 6{
//设备不支持此方法
}else {
//设置错误
}
};