MAVLINKHUD

Overview

The SAVE parameter group (specifically SAVE_CFG or GPS_SAVE_CFG) manages the non-volatile storage of external sensor settings.

Key Concepts

1. Flash Synchronization

When the autopilot configures a peripheral (like a u-Blox GPS), those settings are lost when the GPS powers down unless a "Save" command is sent to the GPS's internal flash.

  • SAVE_CFG:
    • 0: Don't save. Autopilot re-configures the sensor on every boot.
    • 1: Save. Tells the sensor to store the current configuration permanently.

Developer Notes

  • Library: libraries/AP_GPS.

SAVE_CFG

Default 2
Range 0 2

SAVE_CFG: Save GPS configuration

Description

Determines whether the configuration for this GPS should be written to non-volatile memory on the GPS.

Values

Value Meaning
0 Do not save config
1 Save config
2 Save only when needed
  • Default: 2

Description

This parameter controls whether the autopilot's GPS configuration commands (baud rate, update rate, protocol settings) are permanently stored in the GPS module's own memory (Flash/EEPROM).

  • Benefit: If the config is saved on the GPS, it will boot up in the correct state even if the autopilot's serial port hasn't fully initialized.
  • Normal Operation (2): The autopilot checks if the current GPS configuration matches what it wants. If not, it sends the new config and commands the GPS to save it. This is the most efficient and recommended setting.
  • Save Only (1): Forces a save command after every boot.
  • Disable (0): Useful if you have a custom GPS config that you don't want the autopilot to overwrite permanently.