mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 02:13:35 +08:00
drivers/gps: add param for enabling protocols at i2c interface
This commit is contained in:
@@ -904,6 +904,15 @@ GPS::run()
|
||||
gpsConfig.output_mode = GPSHelper::OutputMode::GPS;
|
||||
}
|
||||
|
||||
int32_t gps_ubx_cfg_intf = static_cast<int32_t>(GPSHelper::InterfaceProtocolsMask::ALL_DISABLED);
|
||||
handle = param_find("GPS_UBX_CFG_INTF");
|
||||
|
||||
if (handle != PARAM_INVALID) {
|
||||
param_get(handle, &gps_ubx_cfg_intf);
|
||||
}
|
||||
|
||||
gpsConfig.interface_protocols = static_cast<GPSHelper::InterfaceProtocolsMask>(gps_ubx_cfg_intf);
|
||||
|
||||
if (_helper && _helper->configure(_baudrate, gpsConfig) == 0) {
|
||||
|
||||
/* reset report */
|
||||
|
||||
Reference in New Issue
Block a user