Fix#1189 ask confirmation before saving derived parameter changes to file#1252
Fix#1189 ask confirmation before saving derived parameter changes to file#1252OmkarSarkar204 wants to merge 2 commits intoArduPilot:masterfrom
Conversation
|
Hi @amilcarlucas , |
|
Thanks. I'll take a look at it soon. |
58ea5eb to
70ce9c9
Compare
|
I rebased, squashed and force pushed this. I plan to merge it soon. |
|
Thank you so much, I'll make sure to clean up my commit history next time to save you the effort. |
|
I did a clean up commit on top of your changes. This way you can clearly see what I changed. |
e09b0da to
aa6b4e3
Compare
|
I fixed the pylint issue, passing now. |
|
Thanks.
This will avoid the duplication in calculating it all twice and make the code cleaner. |
aa6b4e3 to
1d30dbb
Compare
|
I've refactored the code to use the single-step approach you suggested: Separated Computation from Saving: If the user clicks 'Yes' on the prompt (or if there are no derived changes), the code calls a new |
2f55b2a to
e7bbb69
Compare
|
The macOS (Python 3.14) CI job failed with an exit code 139 (segfault) during |
|
It's re-triggered. |
Thank You! Its passing now. |
5c38fff to
c0fe055
Compare
…nges Derived parameters are no longer saved automatically. The system now computes changes without mutating the in-memory model and presents them to the user for confirmation before applying. Changes are applied to the in-memory model after user approval, but are only persisted to disk when the user executes the corresponding configuration step in the parameter editor. Implements two-phase approach: - Phase 1: Compute derived values without side effects - Phase 2: Ask user confirmation before applying changes Fixes ArduPilot#1189 Signed-off-by: Omkar Sarkar <omkarsarkar24@gmail.com> Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
…e copy_template_files_to_new_vehicle_dir method This makes it orthogonal from the component derived parameter changes at a later stage. It also makes it easier to understand and test.
c0fe055 to
f1110ab
Compare
|
I need to do some more work on this one. But it's almost there. |
Ok! Please let me know if there’s anything else needed from my side |
|
I added a couple of new issues. Can you help implementing them? |
Sure, I'll check those |
Fix #1189
Earlier, derived parameters were recalculated and saved immediately, which could overwrite user parameter files without any confirmation. I tried to add a small safety step so the backend can detect derived changes first and let the frontend decide whether to commit them.
I am not fully sure if this is the best approach or if its necessary. This is mainly an attempt to make the behavior explicit and safe rather than silent.