mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-09-24 10:58:09 +08:00
drivers/gps: add param for enabling protocols at i2c interface
This commit is contained in:
Submodule src/drivers/gps/devices updated: b76fc1df45...5882667129
@@ -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 */
|
||||
|
||||
@@ -125,6 +125,22 @@ PARAM_DEFINE_INT32(GPS_UBX_MODE, 0);
|
||||
*/
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user