ArduPilot / MissionPlanner

Mission Planner Ground Control Station for ArduPilot (c# .net)
http://ardupilot.org/planner/
GNU General Public License v3.0
1.76k stars 2.38k forks source link

ConfigRawParams: When setting a parameter changes the number of parameters, do a full refresh. and check if reboot is needed #3271

Closed EosBandi closed 7 months ago

EosBandi commented 8 months ago

If a param change causing the change in the number of parameters, the parameter subsystem could stuck in a "downloading is in progress" state. This pr: removes the name check, since not only _enable parameters can change the number of parameters Add a check at the end of Write Params and if the reported param number not equals with the current number, it notify the user and do a param refresh. This fixes #3198

Hwurzburg commented 8 months ago

THANKS! I see the build artifact but not sure how to run it locally for some testing....its an aab file?

davidbuzz commented 8 months ago

param refresh dangerous when armed, as low bandwidth or long range links can be adversely affected - i support it if its tweaked to only do this when disarmed.

rmackay9 commented 8 months ago

PeterH suggested that we should only do the full refresh when the vehicle is disarmed.

Hwurzburg commented 8 months ago

while testing I got this error: image may or may not be related

Otherwise seems to work well....I agree with Pete's comment re refresh only while disarmed...

this PR is really needed!!! thanks

EosBandi commented 8 months ago

while testing I got this error: Based on where it happened in the code, this is unrelated. Do you have steps to repro ?

Otherwise seems to work well....I agree with Pete's comment re refresh only while disarmed...

Indeed, added check for armed state.

Hwurzburg commented 8 months ago

@EosBandi will try to reproduce...I was just randomly enablilng/changing parameters that I know need reboots