Skip to content

feat(parameter-editor): filter parameters absent from connected firmware - #2086

Open
amilcarlucas wants to merge 5 commits into
masterfrom
autoremove_not_available
Open

amilcarlucas wants to merge 5 commits into
masterfrom
autoremove_not_available

Conversation

@amilcarlucas

Copy link
Copy Markdown
Collaborator

Description

Probe N/A configuration-step parameters with PARAM_REQUEST_READ before rendering the parameter table.

Treat PARAM_ERROR/DOES_NOT_EXIST as a definitive absence and omit only those rows. Retain parameters that respond with PARAM_VALUE, including parameters hidden by firmware gating, and leave timeouts as N/A.

Rebuild the configuration-step data model after direct reads update the FC cache so conditional, derived, and auto-imported rows use current FC state. Re-probe any new N/A rows produced by that rebuild before rendering.

Add regression coverage for model-before-render ordering and follow-up presence checks.

Checklist

  • Run pre-commit checks locally
  • Verified by a human programmer
  • All commits are signed off (use git commit --signoff)
  • Code follows our coding standards
  • Documentation updated if needed
  • No breaking changes or properly documented

Testing

Describe how you tested these changes:

  • Unit tests pass
  • Integration tests pass
  • Manual testing performed
  • Tested on flight controller hardware

Copilot AI lite review requested due to automatic review settings September 18, 2026 00:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Resolve concurrent parameter I/O, preserve confirmed absences, invalidate stale requests, and cancel stale table renders.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds firmware parameter-presence probing before rendering configuration-step tables, omitting only definitively absent parameters while preserving hidden and timed-out ones.

Changes:

  • Added direct parameter reads and PARAM_ERROR handling.
  • Rebuilds models after firmware cache updates and performs follow-up checks.
  • Added regression tests for filtering and render ordering.
File summaries
File Summary
tests/test_frontend_tkinter_parameter_editor.py Tests probing and model rebuild ordering.
tests/test_frontend_tkinter_parameter_editor_table.py Tests filtering and rendering behavior.
tests/test_data_model_parameter_editor.py Tests model refresh delegation.
tests/test_backend_flightcontroller_params.py Tests presence detection and response decoding.
ardupilot_methodic_configurator/frontend_tkinter_parameter_editor.py Coordinates asynchronous probing and model rebuilding.
ardupilot_methodic_configurator/frontend_tkinter_parameter_editor_table.py Filters confirmed-absent rows and displays progress.
ardupilot_methodic_configurator/data_model_parameter_editor.py Exposes presence checks and model rebuilding.
ardupilot_methodic_configurator/backend_flightcontroller.py Delegates presence checks.
ardupilot_methodic_configurator/backend_flightcontroller_protocols.py Extends the flight-controller protocol.
ardupilot_methodic_configurator/backend_flightcontroller_params.py Implements direct reads and PARAM_ERROR decoding.
Review details

Suppressed comments (2)

ardupilot_methodic_configurator/frontend_tkinter_parameter_editor.py:1428

  • Resetting the presence state does not invalidate an active request. If the user leaves and returns to the same file before the old worker finishes, and the return does not queue a new batch (for example, no N/A rows remain), the old result still matches the unchanged request ID and filename at line 1486 and can hide rows using stale data. Increment the request generation whenever reset starts, or explicitly discard/cancel the active request.
        if reset:
            self._confirmed_absent_fc_parameter_names.clear()
            self._checked_parameter_presence_names.clear()

ardupilot_methodic_configurator/frontend_tkinter_parameter_editor_table.py:313

  • This clears the viewport but does not invalidate an already scheduled _update_table_in_batches callback. If the user changes steps while a large table is rendering, that callback can still add rows from the previous step into the “Checking...” view, and those stale widgets remain until a later render. Invalidate the current render generation before destroying the widgets (and reset any reserved-row state) so pending batches cannot repopulate this loading screen.
    def show_parameter_presence_check_in_progress(self) -> None:
        """Replace stale rows while direct parameter reads are in progress."""
        for widget in self.view_port.winfo_children():
            widget.destroy()
  • Files reviewed: 10/10 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +1462 to +1468
nonexistent = self.parameter_editor.get_nonexistent_fc_parameters(list(param_names))
except Exception as error: # pylint: disable=broad-exception-caught
logging_warning("Could not check flight-controller parameter presence: %s", error)
nonexistent = set()
self._parameter_presence_results.put((request_id, filename, nonexistent))

threading.Thread(target=check_parameter_presence, daemon=True).start()
completed_request = self._active_parameter_presence_request
self._active_parameter_presence_request = None
if request_id == self._parameter_presence_request_id and filename == self.parameter_editor.current_file:
self._confirmed_absent_fc_parameter_names = nonexistent
@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

☂️ Code Coverage

current status: ✅

Overall Coverage

Statements Covered Coverage Threshold Status
30917 29379 95% 89% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: c9aa8f8 by action🐍

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

     4 files  ±  0       4 suites  ±0   50m 29s ⏱️ -29s
11 135 tests + 84  11 068 ✅ + 84   4 💤 ±0  63 ❌ ±0 
44 298 runs  +324  44 167 ✅ +324  68 💤 ±0  63 ❌ ±0 

For more details on these failures, see this check.

Results for commit 4fd9cc6. ± Comparison against base commit e802f3f.

♻️ This comment has been updated with latest results.

@coveralls

coveralls commented Sep 18, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 37789509885

Coverage decreased (-0.08%) to 91.058%

Details

  • Coverage decreased (-0.08%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 204 coverage regressions across 5 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

204 previously-covered lines in 5 files lost coverage.

File Lines Losing Coverage Coverage
frontend_tkinter_parameter_editor_table.py 103 80.58%
frontend_tkinter_parameter_editor.py 62 92.85%
data_model_parameter_editor.py 20 98.07%
backend_flightcontroller_params.py 14 94.17%
backend_flightcontroller.py 5 92.52%

Coverage Stats

Coverage Status
Relevant Lines: 26013
Covered Lines: 23687
Line Coverage: 91.06%
Relevant Branches: 7876
Covered Branches: 6606
Branch Coverage: 83.88%
Branches in Coverage %: No
Coverage Strength: 2.71 hits per line

💛 - Coveralls

@amilcarlucas
amilcarlucas force-pushed the autoremove_not_available branch from b6cad22 to 833ce5b Compare September 20, 2026 22:03
@AP-Review AP-Review mentioned this pull request Sep 21, 2026
9 of 10 tasks
@amilcarlucas
amilcarlucas force-pushed the autoremove_not_available branch from 833ce5b to 3cdb805 Compare October 5, 2026 15:05
@amilcarlucas amilcarlucas added the AIReview Request an automated AI review; picked up by the reviewprs sweep label Oct 5, 2026
@AP-Review

AP-Review commented Oct 6, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-10-06)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: REQUEST CHANGES

Reviewed at head 3cdb805443.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2086/1.html#prMethodicConfigurator-2086

Thanks for this. Distinguishing hidden parameters from ones that are truly absent is a useful improvement, and treating only an explicit DOES_NOT_EXIST as absence is the right conservative choice. A few things need fixing before merge.

The presence check runs on a background thread (https://github.com/ArduPilot/MethodicConfigurator/pull/2086/files#diff-66416537a8c3d05fc24b29ee4b158b15e4bade6fe86f9229e780081570a279b5R1599) and reads the same MAVLink connection as fetch_param, the post-upload re-download and plugin polling, with no shared lock. Because recv_match throws away messages it does not match, either side can lose the other's replies. I reproduced both directions with the real fetch_param and get_nonexistent_parameters. This is the concern in Copilot's first inline comment, and it is still open. Please route all connection reads through one serialised path, disable upload/skip while the check runs, and stop the worker when the window closes.

The follow-up probe replaces the confirmed-absent set instead of extending it (https://github.com/ArduPilot/MethodicConfigurator/pull/2086/files#diff-66416537a8c3d05fc24b29ee4b158b15e4bade6fe86f9229e780081570a279b5R1618), so a parameter hidden by the first batch reappears after the second. Changing the assignment to self._confirmed_absent_fc_parameter_names.update(nonexistent) fixes it (reset already clears it). This is Copilot's second inline comment.

With the pinned pylint 4.0.9, the changed files now report 11 messages, where the base is a clean 10.00/10: too-many-return-statements and too-many-branches at https://github.com/ArduPilot/MethodicConfigurator/pull/2086/files#diff-59979ba0868d9bd6c7a9e3b955e1fe59cdffdfde2ccff2ae57fd53098c102762R400 and 441, seven attribute-defined-outside-init for the presence state (initialising those attributes in __init__ fixes it), too-many-locals in repopulate_table, and protected-access in the new test. The pylint workflow will fail on these.

Smaller suggestions:

In simple mode, rows hidden as absent are still uploaded (https://github.com/ArduPilot/MethodicConfigurator/pull/2086/files#diff-a1fc77b2f824d73d73195abb5559fad566982d510708937a5c52ba2c86de71acR293), so a verification failure is reported for a parameter the user cannot see. Filtering the upload set the same way would keep the two consistent.

The loading view (https://github.com/ArduPilot/MethodicConfigurator/pull/2086/files#diff-a1fc77b2f824d73d73195abb5559fad566982d510708937a5c52ba2c86de71acR323) leaves the previous step's upload checkboxes in place, so Upload during the check can send values for rows that are not shown. Clearing the checkboxes when the loading view appears would fix it.

Firmware before 4.7 never answers unknown names, so each visit to such a step waits the full 2 s (https://github.com/ArduPilot/MethodicConfigurator/pull/2086/files#diff-66416537a8c3d05fc24b29ee4b158b15e4bade6fe86f9229e780081570a279b5R1477). Caching inconclusive names for the session would help.

Bumping the request id on every reset (https://github.com/ArduPilot/MethodicConfigurator/pull/2086/files#diff-66416537a8c3d05fc24b29ee4b158b15e4bade6fe86f9229e780081570a279b5R1557) would make stale results impossible to accept.

Checking the reply's source system/component (https://github.com/ArduPilot/MethodicConfigurator/pull/2086/files#diff-59979ba0868d9bd6c7a9e3b955e1fe59cdffdfde2ccff2ae57fd53098c102762R486) would stop another node's PARAM_ERROR from hiding a row.

The test docstring at https://github.com/ArduPilot/MethodicConfigurator/pull/2086/files#diff-01a2ce165f9d32eff9b69d3a8ec04e5817ad31de84ad2ad5eb635369ed3b028cR338 says the pinned dialect exposes UNKNOWN_345, but pymavlink 2.4.50 decodes PARAM_ERROR natively. It would be worth rewording the docstring and adding a native-decode test.

@amilcarlucas
amilcarlucas force-pushed the autoremove_not_available branch from 3cdb805 to e853df9 Compare October 8, 2026 14:04
@AP-Review

AP-Review commented Oct 8, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-10-08)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: REQUEST CHANGES

Reviewed at head e853df9580.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2086/2.html#prMethodicConfigurator-2086

Thanks for the rebase. The patch is identical to the one reviewed before (now at e853df9), so the earlier points still apply. There is also one new problem.

New: when a calibration step asks to copy FC values into the file and the user answers YES, the copy is held in memory only. The presence result then rebuilds the step from the saved file (https://github.com/ArduPilot/MethodicConfigurator/pull/2086/files#diff-66416537a8c3d05fc24b29ee4b158b15e4bade6fe86f9229e780081570a279b5R1640), even when the result is inconclusive. That silently reverts the copied values and clears their dirty flags. I reproduced a copied value going from 9 back to the file's 1 with the real model code. A later upload would then write the old value back over the calibration on the FC. Please preserve staged edits across the rebuild, or run the copy workflow after presence processing.

Still blocking from the previous review:

Smaller suggestions:

@amilcarlucas
amilcarlucas force-pushed the autoremove_not_available branch from e853df9 to c36c38d Compare October 13, 2026 21:50
@AP-Review

AP-Review commented Oct 13, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-10-13)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: REQUEST CHANGES

Reviewed at head 2ae0c22b87.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2086/3.html#prMethodicConfigurator-2086

Thanks for the rebase. The feature commit is the same patch as before (now c36c38d, plus the pre-commit import fix), so the earlier points still apply. This time I also ran the backend against ArduCopter 4.7.2 and 4.6.3 SITL with the AirCar_v1 template. On 4.7.2 the feature does its job: 82 names were reported absent, 113 hidden names came back with values, and most checks took 0.1 to 0.3 s.

Blocking:

Smaller suggestions:

Not tested: the GUI end to end against a live FC, real hardware, and firmware other than ArduCopter SITL.

@amilcarlucas
amilcarlucas force-pushed the autoremove_not_available branch from 2ae0c22 to f7c25ae Compare October 13, 2026 23:16
@AP-Review

AP-Review commented Oct 14, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-10-14)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: REQUEST CHANGES

Reviewed at head f7c25aef17.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2086/4.html#prMethodicConfigurator-2086

Thanks for the rebase. Since the last review the branch moved from 2ae0c22 to f7c25ae; git range-diff shows the same feature commit with the import-order fix squashed in, and there has been no reply in the thread, so the earlier points still apply. I re-ran them against f7c25ae. The feature itself still does its job: in the SITL run on ArduCopter 4.7.2 with AirCar_v1, 82 names were reported absent and 113 hidden names came back with values, and only an explicit DOES_NOT_EXIST hides a row.

Blocking:

Smaller suggestions:

Not tested: the full Tk window against a live FC, real hardware, Windows and macOS, and firmware other than ArduCopter 4.7.2 and 4.6.3 SITL. The SITL figures above are from the first pass of this review; the later passes re-checked the behaviour with a simulated FC, not SITL.

@amilcarlucas
amilcarlucas force-pushed the autoremove_not_available branch from f7c25ae to b55494f Compare November 8, 2026 22:31
@AP-Review

AP-Review commented Nov 8, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-08)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: REQUEST CHANGES

Reviewed at head b55494f6dc.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2086/5.html#prMethodicConfigurator-2086

Changes requested: one existing test file now fails at this head. Since the last review (at f7c25ae; the head is now b55494f), the three earlier blockers and the smaller suggestions are fixed. Copied FC values stay dirty across the rebuild, the check holds the navigation lock and recovery lease and close waits for it, and pylint is clean.

Blocking

  1. frontend_tkinter_parameter_editor.py:555: _lock_connection_plugin() now reads self.inline_component_container, which the MagicMock(spec=ParameterEditorWindow) editors in tests/test_frontend_tkinter_mavlink_inspector.py don't have. As a result 14 inspector tests fail with AttributeError, and the ubuntu, Windows and Docker pytest jobs go red (they pass at the merge-base). Set editor.inline_component_container = None in those mocks, or read it with getattr(..., None).

Should fix

  • frontend_tkinter_parameter_editor_table.py:354: the absent set is only cleared on step entry. If connection recovery later gives a hidden name an FC value, the row stays hidden and is left out of uploads until the user leaves the step and comes back. Drop names that now have FC values in _finish_connection_recovery(), or skip the filter for parameters with has_fc_value.
Minor (1)
  • frontend_tkinter_parameter_editor_table.py:353: the table reads the window's private _confirmed_absent_fc_parameter_names via getattr with a silent default. Declaring it on ParameterEditorTableHost would make the dependency typed.

The removed property list in the FlightController class docstring is not raised: each property keeps its own docstring.

@amilcarlucas
amilcarlucas force-pushed the autoremove_not_available branch 3 times, most recently from ced6652 to 1d78a1f Compare November 9, 2026 01:01
@AP-Review

AP-Review commented Nov 9, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-09)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: REQUEST CHANGES

Reviewed at head 1d78a1fe81.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2086/6.html#prMethodicConfigurator-2086

Changes requested: one new test leaks a Tk grab and turns CI red. Since the last review (at b55494f; the head is now 1d78a1f), the inspector-test break, the stale absent-set after recovery and the untyped host attribute are all fixed.

Blocking

  1. test_frontend_tkinter_parameter_editor.py:5730: test_recovery_restores_previously_absent_parameter_to_table_and_upload builds a real table on the shared root with a MagicMock model. The recovery repaint then opens the bitmask usage popup, which grabs the root and keeps the grab. As a result 4 tests in test_frontend_tkinter_parameter_export.py fail with "grab failed", and the documentation-collapse test fails too (ubuntu, Windows and Docker pytest are red; they pass at the merge-base). Add editor.parameter_editor.should_display_bitmask_parameter_editor_usage.return_value = False, as other tests in that file already do.

@amilcarlucas
amilcarlucas force-pushed the autoremove_not_available branch from 1d78a1f to d6f4bbb Compare November 9, 2026 18:49
@AP-Review

AP-Review commented Nov 9, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-09)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: ACCEPT

Reviewed at head d6f4bbbd6c.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2086/7.html#prMethodicConfigurator-2086

Looks good to merge: no open findings remain at d6f4bbb.

Since the last review (at 1d78a1f, the head is now d6f4bbb), the Tk grab leak in test_recovery_restores_previously_absent_parameter_to_table_and_upload is fixed by the added should_display_bitmask_parameter_editor_usage.return_value = False. The export and documentation tests pass again locally and in CI. The remaining red CI jobs are macOS Homebrew setup (red at base too), the Publish gate that depends on it, and dead links in docs this PR does not touch.

@amilcarlucas
amilcarlucas force-pushed the autoremove_not_available branch from d6f4bbb to c9aa8f8 Compare November 9, 2026 23:37
@AP-Review

AP-Review commented Nov 10, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-10)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: COMMENT

Reviewed at head c9aa8f8bc5.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2086/8.html#prMethodicConfigurator-2086

Nearly ready: one low-priority model edge case is open and nothing blocks.

Nothing was open after the last review at d6f4bbb. Since then the head has moved to c9aa8f8: the presence check now uses BackgroundTaskRunner (with a Thread.start failure fix), and the earlier grab-leak test fix (tests/test_frontend_tkinter_parameter_editor.py:5707) is still in place.

Minor (2)
  • ardupilot_methodic_configurator/data_model_parameter_editor.py:329: restoring a dirty bitmask edit passes str(1.0), i.e. "1.0", to set_new_value, which bitmask parsing (int(s, 0)) rejects. The edit and its reason are lost and the ValueError escapes the rebuild. Use previous.value_as_string and add a bitmask case to the edit-preservation tests. No current UI path to it was found.
  • commit 7864243: informational only. This commit and a6b097f leave backend_flightcontroller.py at 1008 lines (pylint C0302), and the docstring trim brings it back to 999. The head is lint-clean, so no change is needed.

amilcarlucas and others added 2 commits December 2, 2026 19:02
…t failure

When Thread.start() raised, the runner kept the dead thread and the
completion callback, so every later start() was refused as "active".
Clear both before re-raising so the user can retry.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <[email protected]>
…ameter names

fetch_param raised IndexError for names that fail MAVLink validation,
which is unrelated to indexing and indistinguishable from real index
bugs. Introduce InvalidParamNameError(ValueError) so callers can handle
the validation failure specifically.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <[email protected]>
@amilcarlucas
amilcarlucas force-pushed the autoremove_not_available branch from c9aa8f8 to 4fd9cc6 Compare December 2, 2026 18:44
@AP-Review

Copy link
Copy Markdown

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: REQUEST CHANGES

Reviewed at head 4fd9cc6093.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2086/9.html#prMethodicConfigurator-2086

Not ready yet: the parameter-presence probe ignores every reply on a real link, and once that is fixed it would delete parameters from the quick-tune step's file.

Since the last review at c9aa8f8, the head moved to 4fd9cc6. The bitmask edit-restore issue is fixed and tested. The BackgroundTaskRunner fix is now its own commit, and the feature now deletes absent rows instead of hiding them.

Blocking

  1. ardupilot_methodic_configurator/backend_flightcontroller_params.py:492: master.target_component is 0 on a real AMC link (pymavlink only locks the sysid), so replies from the autopilot at component 1 never match. The probe finds nothing and every batch waits the full 2 s with navigation locked. Match the component from info.component_id (as backend_flightcontroller_commands.py does), or accept any component when it is 0, and add a target_component=0 test.
  2. ardupilot_methodic_configurator/data_model_parameter_editor.py:2343: absent parameters go into the file delete set. In 33_quick_tune_setup.param, the 14 QUIK_* parameters only exist after SCR_ENABLE=1 and a reboot, but the save before upload writes the file with only SCR_ENABLE, so the template values are lost. The note at ARCHITECTURE_5_parameter_editor.md:373 assumes the restore happens before the save. Keep absences out of the persistent delete set (hide the rows instead), or skip deletion while the step changes a reboot-required enable parameter.
Minor (2)

amilcarlucas and others added 3 commits December 2, 2026 22:53
…(ArduPilot >= 4.7)

ArduPilot 4.7 answers PARAM_REQUEST_READ for a missing parameter with an
explicit PARAM_ERROR/DOES_NOT_EXIST. Probe step parameters that lack a
cached flight-controller value in batches of ten with one retry. Hold
the navigation lock and connection-recovery lease during the probe.

Address requests to the system and component identified by the
connection handshake, and only accept replies from that controller.
pymavlink can leave the target component at broadcast after a heartbeat.
Cache PARAM_VALUE replies from hidden parameters and keep rows when a
timeout or an inconclusive error leaves their availability unknown.

Remove confirmed-absent parameters from the step and omit them on the
next confirmed save. When the step changes an existing enable parameter
that can require a reboot, retain the absent rows and their file values.
Send dependent parameters in the upload pass after reboot so Quick Tune
keeps its QUIK_* settings when SCR_ENABLE changes.

Forget absences when the step changes or the controller supplies a
value. Preserve unsaved additions, deletions, values, reasons and manual
overrides when reconnect or readback rebuilds the step.

Wait for the probes before offering to copy live values. Complete the
step's file transfers before activating its plugin so the plugin cannot
consume MAVFTP replies. Show the step instructions after activation.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <[email protected]>
The project's firmware version in vehicle_components.json is updated to
the connected FC's version before the parameter-file upgrade runs. Files
the user never opened stayed un-migrated on disk and the upgrade was not
triggered again, so their legacy parameters would later be removed as
absent from the firmware.

upgrade_parameters_for_firmware_version now returns the names of the files
it changed, and main() saves exactly those files right after the upgrade.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <[email protected]>
The connected firmware version is still set in memory early, because
derived parameters need it, but vehicle_components.json is now written
only after the upgraded parameter files were saved. An interrupted start
therefore retries the upgrade instead of skipping it.

Every save of vehicle_components.json, including the project-format
migration, now also refreshes the 'Program version' with the running AMC
version.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <[email protected]>
@amilcarlucas
amilcarlucas force-pushed the autoremove_not_available branch from 4fd9cc6 to 6441f03 Compare December 2, 2026 21:59

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIReview Request an automated AI review; picked up by the reviewprs sweep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants