mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
ubx: add option to wipe flash
This commit is contained in:
parent
9c1a22e74e
commit
752ecd3d1b
@ -1 +1 @@
|
||||
Subproject commit 4cea5de87ce7e2a52e5289bd3639fd8eb770eafa
|
||||
Subproject commit f31394a37e252e3017e64f729312bcce05ea3a90
|
||||
@ -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
|
||||
*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user