drivers/gps: add param for enabling protocols at i2c interface

This commit is contained in:
Igor Misic
2022-12-19 08:52:36 +01:00
committed by Beat Küng
parent e5255b173a
commit df441ac202
3 changed files with 26 additions and 1 deletions
+9
View File
@@ -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 */