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

This commit is contained in:
Igor Misic authored and Beat Küng committed 2022-12-19 08:52:36 +01:00
1 parent e5255b173a
commit df441ac202
3 files changed
+26 -1

No files matched your search

+9
View File
@@ -904,6 +904,15 @@ GPS::run()
gpsConfig.output_mode = GPSHelper::OutputMode::GPS; 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) { if (_helper && _helper->configure(_baudrate, gpsConfig) == 0) {
/* reset report */ /* reset report */
+16
View File
@@ -125,6 +125,22 @@ PARAM_DEFINE_INT32(GPS_UBX_MODE, 0);
*/ */
PARAM_DEFINE_INT32(GPS_UBX_BAUD2, 230400); PARAM_DEFINE_INT32(GPS_UBX_BAUD2, 230400);
/**
* u-blox protocol configuration for interfaces
*
* @min 0
* @max 32
* @bit 0 Enable I2C input protocol UBX
* @bit 1 Enable I2C input protocol NMEA
* @bit 2 Enable I2C input protocol RTCM3X
* @bit 3 Enable I2C output protocol UBX
* @bit 4 Enable I2C output protocol NMEA
* @bit 5 Enable I2C output protocol RTCM3X
*
* @reboot_required true
* @group GPS
*/
PARAM_DEFINE_INT32(GPS_UBX_CFG_INTF, 0);
/** /**
* Heading/Yaw offset for dual antenna GPS * Heading/Yaw offset for dual antenna GPS