Custom parameters not saving

Hi all,

I have added new parameters to the Ardusub/Parameters.cpp class.
The parameters show up in QGC and can be set without an issue.
However, after a reboot the parameters are always back at default value.

Interestingly enough, i also added a parameter to AP_MOTOR/Motors6dof.cpp class, which also works fine. This parameter is also persisten through reboots.

Example of implementation in Ardusub/Parameters.cpp

  • added to var_info[]
	// @Param: DOCKING_YAW_P
	// @DisplayName: Docking Mode Heading P
	// @Description: Docking mode heading PID controller, P gain
	// @Range:-10000 10000
	// @User: Advanced

The example parameter is added in the enum in Ardusub/Parameters.h as

k_param_docking_mode_yaw_p = 5000,

and the variable is defined as

AP_Float docking_mode_yaw_p;

The default value is defined in ArduSub/config.h as


Any thoughts on how to get this to be persisten through reboots?


Similar issue. Any insight?

Can you share your code on a pull request, and post a .bin file using something like ?