mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-25 12:10:35 +08:00
ubx: add option to wipe flash
This commit is contained in:
+1
-1
Submodule src/drivers/gps/devices updated: 4cea5de87c...f31394a37e
@@ -909,6 +909,15 @@ GPS::run()
|
||||
|
||||
gpsConfig.interface_protocols = static_cast<GPSHelper::InterfaceProtocolsMask>(gps_ubx_cfg_intf);
|
||||
|
||||
int32_t gps_cfg_wipe = 0;
|
||||
handle = param_find("GPS_CFG_WIPE");
|
||||
|
||||
if (handle != PARAM_INVALID) {
|
||||
param_get(handle, &gps_cfg_wipe);
|
||||
}
|
||||
|
||||
gpsConfig.cfg_wipe = static_cast<bool>(gps_cfg_wipe);
|
||||
|
||||
if (_helper && _helper->configure(_baudrate, gpsConfig) == 0) {
|
||||
|
||||
/* reset report */
|
||||
|
||||
@@ -142,6 +142,22 @@ PARAM_DEFINE_INT32(GPS_UBX_BAUD2, 230400);
|
||||
*/
|
||||
PARAM_DEFINE_INT32(GPS_UBX_CFG_INTF, 0);
|
||||
|
||||
/**
|
||||
* Wipes the flash config of UBX modules.
|
||||
*
|
||||
* Some UBX modules have a FLASH that allows to store persistent configuration that will be loaded on start.
|
||||
* PX4 does override all configuration parameters it needs in RAM, which takes precedence over the values in FLASH.
|
||||
* However, configuration parameters that are not overriden by PX4 can still cause unexpected problems during flight.
|
||||
* To avoid these kind of problems a clean config can be reached by wiping the FLASH on boot.
|
||||
*
|
||||
* Note: Currently only supported on UBX.
|
||||
*
|
||||
* @reboot_required true
|
||||
* @group GPS
|
||||
* @boolean
|
||||
*/
|
||||
PARAM_DEFINE_INT32(GPS_CFG_WIPE, 0);
|
||||
|
||||
/**
|
||||
* Heading/Yaw offset for dual antenna GPS
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user