Enforcing valid values of configuration parameters

Dear all,

I would like to ask you guys opinions about how to enforce configuration parameters within the valid ranges based on documentation.
As far as I understand, ArduPilot does not want to limit users’ freedom to assign any values to the parameters.
If I want to constraint the parameters, there are two design options: 1) when ArduPilot parses a MAVLink message which changes the parameter value, ArduPilot can enforce the parameter to have a valid value. 2) Users can freely assign any value to the parameters. However, ArduPilot uses a default parameter value if the parameter assigned by the users has a value outside the valid range. I believe that current ArduPilot version already do that for a small set of the parameters.
Could I ask which option is more feasible and practical? Thank you!

You could run slowish checks with scripting. That would be OK for boot, but stuff would be out of range for a few seconds until scripting got to round that param.

Its not worth the flash cost to range check all params in AP, not to mention that some users need values outside the typical ranges.

The other way to range check on the GCS, MP will already warn that the value is out of range.

1 Like

I think that the scripting during boot and checking ranges on the GCS side are more reasonable approach than what I thought. Thanks for sharing the idea!