Repository navigation
Rc calib - #2308
Rc calib#2308
Conversation
Previous review (2026-10-31)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Two problems: the ESC MAVLink1/BDShot and RC sample-loss fixes look correct, but the PR breaks the pylint gates, and the new single-read RC poll can fall behind the stream. Blocking
Minor
The windows-latest pytest failures match base and are not caused by this PR. |
☂️ Code Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
Test Results 3 files ± 0 3 suites ±0 42m 46s ⏱️ - 1m 16s For more details on these failures, see this check. Results for commit f9fa81a. ± Comparison against base commit ea6bd3f. This pull request removes 5 and adds 31 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
Fixed and verified on the connected Cube: step 08 now shows ESC 9–12. 0* means zero RPM or unavailable individual telemetry; electrical values remain unavailable. Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
7698ba3 to
0e633dd
Compare
Previous review (2026-10-31)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head No problems found at the reviewed head Both problems from the last review are fixed. The pylint and Docker lint jobs pass again: the flagged sites now have suppressions, and the duplicated RC stream-request code moved into the shared backend_rc_telemetry.py. RC calibration now drains up to 50 packets per poll and folds every sample into min/max, so the display no longer falls behind a fast RC stream. The earlier note that the windows-latest pytest failures match base still holds: the same three layout asserts fail on base. The macOS job fails in Homebrew setup before any tests run. Not fully reviewed: commit 79060d6, pushed after the reviewed head. Head moved during review: observed |
Previous review (2026-10-31)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Two lint gates are red at Since the last review, the new commit Blocking
Note
The earlier notes that |
Consolidate telemetry transport and RC view polling to keep connection handling, bounded reads, rendering, and warnings consistent. - Add MavlinkTelemetryBackend for shared observer registration, connection changes, cleanup, and the 200-packet/10-ms polling limit. - Reuse the backend in ESC and data telemetry while preserving their message decoding and request behavior. - Share polling, rendering, warning counters, and timer scheduling between the embedded RC calibration view and floating monitor. - Apply the existing selected-controller source filter to calibration so foreign RC samples and heartbeats cannot affect its results. - Remove the unused heartbeat reader that could discard RC samples. - Reuse source-aware MAVLink messages and controller fixtures in tests. - Cover foreign-source rejection, polling limits, reconnects, and preservation of other observers. - Include the shared backend in mutation-testing targets. Validation: - 482 relevant tests pass. - Two known GUI layout failures remain excluded. - Pre-commit, Pylint, mypy, and Pyright pass. Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
79060d6 to
f9fa81a
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Two telemetry tests leave real heartbeat threads running after teardown because backend.close() only detaches the observer; both need to disable the heartbeat side effect before polling.
1 open issue
What changed in this PR
This PR fixes RC calibration telemetry handling and improves ESC monitoring in ArduPilot Methodic Configurator.
Changes:
- Share RC stream lifecycle handling, filter telemetry by controller source, and preserve calibration extremes across queued samples.
- Support ESC telemetry on connections initially using MAVLink 1 and mark ambiguous zero-RPM readings for configured bidirectional DShot outputs.
- Consolidate bounded telemetry polling and expand regression coverage.
| File | Description |
|---|---|
| tests/test_frontend_tkinter_navigation_lock.py | Adapt cleanup mocking to the new polling mixin. |
| tests/test_esc_telemetry.py | Cover protocol compatibility, zero RPM, and polling limits. |
| tests/telemetry_test_helpers.py | Add a shared real RC message builder. |
| tests/plugins/test_frontend_tkinter_rc_calibration.py | Test stream resumption and consecutive display updates. |
| tests/plugins/test_data_model_rc_receiver.py | Test receiver-to-calibration stream handoff. |
| tests/plugins/test_data_model_rc_calibration.py | Cover source filtering, queued extremes, and reconnection. |
| tests/plugins/conftest.py | Share a selected-controller fixture. |
| pyproject.toml | Include the shared telemetry backend in mutation testing. |
| ardupilot_methodic_configurator/plugins/frontend_tkinter_rc_calibration.py | Share polling logic and release streams on deactivation. |
| ardupilot_methodic_configurator/plugins/data_model_rc_receiver.py | Use the shared RC telemetry transport. |
| ardupilot_methodic_configurator/plugins/data_model_rc_calibration.py | Process bounded batches while preserving calibration extremes. |
| ardupilot_methodic_configurator/plugins/backend_rc_telemetry.py | Add shared stream management and source filtering. |
| ardupilot_methodic_configurator/frontend_tkinter_esc_telemetry.py | Explain ambiguous zero-RPM readings in the tooltip. |
| ardupilot_methodic_configurator/data_model_esc_telemetry.py | Display configured bidirectional DShot zero readings as 0*. |
| ardupilot_methodic_configurator/backend_mavlink_telemetry.py | Centralize observer lifecycle and bounded reads. |
| ardupilot_methodic_configurator/backend_esc_telemetry.py | Request and decode MAVLink 2 ESC telemetry. |
| ardupilot_methodic_configurator/backend_data_telemetry.py | Reuse the shared observer and polling implementation. |
Review effort: Balanced
|
Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Only a minor test-cleanup issue remains at f9fa81a; no runtime problem was found. Both blockers from the last review are fixed: ty and pylint (including duplicate-code) pass again, and the pylint and Docker lint jobs are green. Minor (1)
Note
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Amilcar Lucas <amilcar.lucas@iav.de>

Description
RC calibration fix
Checklist
git commit --signoff)Testing
Describe how you tested these changes: