Repository navigation
Rc controller - #2177
Rc controller#2177
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Migration omits fourth/fifth IMU values, and newly introduced RC messages are absent from translation catalogs.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Improves RC calibration through staged parameter editing, live visualization, and format-2 template migration support.
Changes:
- Expands the RC calibration plugin with mapping presets, channel options, telemetry previews, and a Pillow renderer.
- Adds migration/reordering logic and format-2 X500 templates.
- Adds broad migration, template, renderer, GUI, and tooling tests.
| File | Description |
|---|---|
.github/copilot-instructions.md |
Fixes the pytest command example. |
.github/skills/configuration-steps-reorder/SKILL.md |
Updates step-reordering guidance. |
.github/skills/configuration-steps-reorder/scripts/param_reorder.py |
Adds safer anchored renaming. |
ARCHITECTURE_rc_calibration.md |
Documents RC calibration architecture. |
TUNING_GUIDE_ArduCopter_mig.md |
Adds migrated workflow guidance. |
ardupilot_methodic_configurator/backend_filesystem_migration.py |
Implements format-2 migration. |
ardupilot_methodic_configurator/data_model_parameter_editor.py |
Exposes parameter metadata choices. |
ardupilot_methodic_configurator/frontend_tkinter_template_overview.py |
Handles migration templates. |
ardupilot_methodic_configurator/plugins/data_model_rc_calibration.py |
Adds staged RC editing logic. |
ardupilot_methodic_configurator/plugins/frontend_tkinter_rc_calibration.py |
Expands the RC calibration UI. |
ardupilot_methodic_configurator/plugins/renderer_3d_quadcopter.py |
Adds the live craft renderer. |
Holybro_X500_mig/00_default.param |
Adds migrated defaults. |
Holybro_X500_mig/02_imu_temperature_calibration_setup.param |
Adds migrated IMU setup. |
Holybro_X500_mig/03_imu_temperature_calibration_results.param |
Adds migrated IMU results. |
Holybro_X500_mig/04_imu_temperature_calibration_finish.param |
Adds migrated IMU finish values. |
Holybro_X500_mig/05_board_orientation.param |
Adds board-orientation values. |
Holybro_X500_mig/06_remote_controller_receiver.param |
Adds receiver configuration. |
Holybro_X500_mig/07_remote_controller_controller.param |
Adds RC-controller configuration. |
Holybro_X500_mig/08_telemetry.param |
Adds telemetry configuration. |
Holybro_X500_mig/09_esc_telemetry.param |
Adds ESC telemetry configuration. |
Holybro_X500_mig/10_battery_monitor.param |
Adds battery-monitor configuration. |
Holybro_X500_mig/11_battery.param |
Adds battery configuration. |
Holybro_X500_mig/12_gnss.param |
Adds GNSS configuration. |
Holybro_X500_mig/13_initial_atc.param |
Adds initial controller values. |
Holybro_X500_mig/14_accelerometer_calibration.param |
Adds accelerometer calibration. |
Holybro_X500_mig/15_accelerometer_level.param |
Adds accelerometer leveling. |
Holybro_X500_mig/16_compass_calibration.param |
Adds compass calibration. |
Holybro_X500_mig/17_flight_modes.param |
Adds flight-mode configuration. |
Holybro_X500_mig/18_servo_outputs.param |
Adds servo-output configuration. |
Holybro_X500_mig/19_general_configuration.param |
Adds general configuration. |
Holybro_X500_mig/20_safety_setup.param |
Adds safety configuration. |
Holybro_X500_mig/21_remote_id.param |
Adds Remote ID configuration. |
Holybro_X500_mig/22_osd.param |
Adds OSD configuration. |
Holybro_X500_mig/23_motor.param |
Adds motor configuration. |
Holybro_X500_mig/24_esc.param |
Adds ESC configuration. |
Holybro_X500_mig/25_motor_notch_filter_setup.param |
Adds motor-notch setup. |
Holybro_X500_mig/26_motor_notch_logging.param |
Adds motor-notch logging. |
Holybro_X500_mig/27_optional_pid_adjustment.param |
Adds optional PID adjustment. |
Holybro_X500_mig/28_throttle_controller.param |
Adds throttle-controller values. |
Holybro_X500_mig/29_motor_notch_filter_results.param |
Adds motor-notch results. |
Holybro_X500_mig/30_ekf_config.param |
Adds EKF configuration. |
Holybro_X500_mig/31_pid_notch_filter_logging.param |
Adds PID-notch logging. |
Holybro_X500_mig/32_pid_notch_filter_results.param |
Adds PID-notch results. |
Holybro_X500_mig/33_quick_tune_setup.param |
Adds quick-tune setup. |
Holybro_X500_mig/34_quick_tune_results.param |
Adds quick-tune results. |
Holybro_X500_mig/35_inflight_magnetometer_fit_setup.param |
Adds MagFit setup. |
Holybro_X500_mig/35_inflight_magnetometer_fit_setup.pdef.xml |
Adds MagFit metadata. |
Holybro_X500_mig/36_inflight_magnetometer_fit_results.param |
Adds MagFit results. |
Holybro_X500_mig/37_evaluate_the_aircraft_tune_ff_disable.param |
Adds tune evaluation setup. |
Holybro_X500_mig/38_evaluate_the_aircraft_tune_ff_enable.param |
Adds tune evaluation finish. |
Holybro_X500_mig/39_autotune_roll_setup.param |
Adds roll autotune setup. |
Holybro_X500_mig/40_autotune_roll_results.param |
Adds roll autotune results. |
Holybro_X500_mig/41_autotune_pitch_setup.param |
Adds pitch autotune setup. |
Holybro_X500_mig/42_autotune_pitch_results.param |
Adds pitch autotune results. |
Holybro_X500_mig/43_autotune_yaw_setup.param |
Adds yaw autotune setup. |
Holybro_X500_mig/44_autotune_yaw_results.param |
Adds yaw autotune results. |
Holybro_X500_mig/45_autotune_yawd_setup.param |
Adds yaw-D autotune setup. |
Holybro_X500_mig/46_autotune_yawd_results.param |
Adds yaw-D autotune results. |
Holybro_X500_mig/47_autotune_roll_pitch_retune_setup.param |
Adds retune setup. |
Holybro_X500_mig/48_autotune_roll_pitch_retune_results.param |
Adds retune results. |
Holybro_X500_mig/49_autotune_finish.param |
Adds autotune finish values. |
Holybro_X500_mig/50_pid_d_ff.param |
Adds PID D/FF values. |
Holybro_X500_mig/51_windspeed_estimation.param |
Adds wind estimation. |
Holybro_X500_mig/52_barometer_compensation.param |
Adds barometer compensation. |
Holybro_X500_mig/53_windspeed_estimation_finish.param |
Finishes wind estimation. |
Holybro_X500_mig/54_system_id_input_roll.param |
Adds roll system identification. |
Holybro_X500_mig/55_system_id_input_pitch.param |
Adds pitch system identification. |
Holybro_X500_mig/56_system_id_input_yaw.param |
Adds yaw system identification. |
Holybro_X500_mig/57_system_id_mixer_roll.param |
Adds roll mixer identification. |
Holybro_X500_mig/58_system_id_mixer_pitch.param |
Adds pitch mixer identification. |
Holybro_X500_mig/59_system_id_mixer_yaw.param |
Adds yaw mixer identification. |
Holybro_X500_mig/60_system_id_mixer_thrust.param |
Adds thrust mixer identification. |
Holybro_X500_mig/61_analytical_pid_optimization.param |
Adds PID optimization. |
Holybro_X500_mig/64_position_controller.param |
Adds position-controller values. |
Holybro_X500_mig/65_guided_operation.param |
Adds guided-operation values. |
Holybro_X500_mig/66_precision_land.param |
Adds precision-landing values. |
Holybro_X500_mig/67_optical_flow_setup.param |
Adds optical-flow setup. |
Holybro_X500_mig/68_optical_flow_results.param |
Adds optical-flow results. |
Holybro_X500_mig/69_use_optical_flow_instead_of_gnss.param |
Adds optical-flow selection. |
Holybro_X500_mig/70_everyday_use.param |
Adds everyday-use values. |
Holybro_X500_mig/configuration_steps_ArduCopter.json |
Defines format-2 steps and plugins. |
Holybro_X500_mig/vehicle_components.json |
Defines migrated vehicle metadata. |
empty_4.6.x_mig/00_default.param |
Adds empty-template defaults. |
empty_4.6.x_mig/02_imu_temperature_calibration_setup.param |
Adds empty IMU setup. |
empty_4.6.x_mig/03_imu_temperature_calibration_results.param |
Adds empty IMU results. |
empty_4.6.x_mig/04_imu_temperature_calibration_finish.param |
Adds empty IMU finish step. |
empty_4.6.x_mig/05_board_orientation.param |
Adds empty board-orientation step. |
empty_4.6.x_mig/06_remote_controller_receiver.param |
Adds empty receiver step. |
empty_4.6.x_mig/07_remote_controller_controller.param |
Adds empty RC-controller step. |
empty_4.6.x_mig/08_telemetry.param |
Adds empty telemetry step. |
empty_4.6.x_mig/09_esc_telemetry.param |
Adds empty ESC telemetry step. |
empty_4.6.x_mig/10_battery_monitor.param |
Adds empty battery-monitor step. |
empty_4.6.x_mig/11_battery.param |
Adds empty battery step. |
empty_4.6.x_mig/12_gnss.param |
Adds empty GNSS step. |
empty_4.6.x_mig/13_initial_atc.param |
Adds empty initial-ATC step. |
empty_4.6.x_mig/14_accelerometer_calibration.param |
Adds empty accelerometer step. |
empty_4.6.x_mig/15_accelerometer_level.param |
Adds empty leveling step. |
empty_4.6.x_mig/16_compass_calibration.param |
Adds empty compass step. |
empty_4.6.x_mig/17_flight_modes.param |
Adds empty flight-mode step. |
empty_4.6.x_mig/18_servo_outputs.param |
Adds empty servo-output step. |
empty_4.6.x_mig/19_general_configuration.param |
Adds empty general step. |
empty_4.6.x_mig/20_safety_setup.param |
Adds empty safety step. |
empty_4.6.x_mig/21_remote_id.param |
Adds empty Remote ID step. |
empty_4.6.x_mig/22_osd.param |
Adds empty OSD step. |
empty_4.6.x_mig/23_motor.param |
Adds empty motor step. |
empty_4.6.x_mig/24_esc.param |
Adds empty ESC step. |
empty_4.6.x_mig/25_motor_notch_filter_setup.param |
Adds empty motor-notch setup. |
empty_4.6.x_mig/26_motor_notch_logging.param |
Adds empty motor-notch logging. |
empty_4.6.x_mig/27_optional_pid_adjustment.param |
Adds empty PID-adjustment step. |
empty_4.6.x_mig/28_throttle_controller.param |
Adds empty throttle step. |
empty_4.6.x_mig/29_motor_notch_filter_results.param |
Adds empty motor-notch results. |
empty_4.6.x_mig/30_ekf_config.param |
Adds empty EKF step. |
empty_4.6.x_mig/31_pid_notch_filter_logging.param |
Adds empty PID-notch logging. |
empty_4.6.x_mig/32_pid_notch_filter_results.param |
Adds empty PID-notch results. |
empty_4.6.x_mig/33_quick_tune_setup.param |
Adds empty quick-tune setup. |
empty_4.6.x_mig/34_quick_tune_results.param |
Adds empty quick-tune results. |
empty_4.6.x_mig/35_inflight_magnetometer_fit_setup.param |
Adds empty MagFit setup. |
empty_4.6.x_mig/36_inflight_magnetometer_fit_results.param |
Adds empty MagFit results. |
empty_4.6.x_mig/37_evaluate_the_aircraft_tune_ff_disable.param |
Adds empty tune evaluation. |
empty_4.6.x_mig/38_evaluate_the_aircraft_tune_ff_enable.param |
Adds empty evaluation finish. |
empty_4.6.x_mig/39_autotune_roll_setup.param |
Adds empty roll autotune setup. |
empty_4.6.x_mig/40_autotune_roll_results.param |
Adds empty roll autotune results. |
empty_4.6.x_mig/41_autotune_pitch_setup.param |
Adds empty pitch autotune setup. |
empty_4.6.x_mig/42_autotune_pitch_results.param |
Adds empty pitch autotune results. |
empty_4.6.x_mig/43_autotune_yaw_setup.param |
Adds empty yaw autotune setup. |
empty_4.6.x_mig/44_autotune_yaw_results.param |
Adds empty yaw autotune results. |
empty_4.6.x_mig/45_autotune_yawd_setup.param |
Adds empty yaw-D setup. |
empty_4.6.x_mig/46_autotune_yawd_results.param |
Adds empty yaw-D results. |
empty_4.6.x_mig/47_autotune_roll_pitch_retune_setup.param |
Adds empty retune setup. |
empty_4.6.x_mig/48_autotune_roll_pitch_retune_results.param |
Adds empty retune results. |
empty_4.6.x_mig/49_autotune_finish.param |
Adds empty autotune finish. |
empty_4.6.x_mig/50_pid_d_ff.param |
Adds empty PID D/FF step. |
empty_4.6.x_mig/51_windspeed_estimation.param |
Adds empty wind-estimation step. |
empty_4.6.x_mig/52_barometer_compensation.param |
Adds empty barometer step. |
empty_4.6.x_mig/53_windspeed_estimation_finish.param |
Adds empty wind finish step. |
empty_4.6.x_mig/54_system_id_input_roll.param |
Adds empty roll SysID step. |
empty_4.6.x_mig/55_system_id_input_pitch.param |
Adds empty pitch SysID step. |
empty_4.6.x_mig/56_system_id_input_yaw.param |
Adds empty yaw SysID step. |
empty_4.6.x_mig/57_system_id_mixer_roll.param |
Adds empty roll mixer step. |
empty_4.6.x_mig/58_system_id_mixer_pitch.param |
Adds empty pitch mixer step. |
empty_4.6.x_mig/59_system_id_mixer_yaw.param |
Adds empty yaw mixer step. |
empty_4.6.x_mig/60_system_id_mixer_thrust.param |
Adds empty thrust mixer step. |
empty_4.6.x_mig/61_analytical_pid_optimization.param |
Adds empty optimization step. |
empty_4.6.x_mig/64_position_controller.param |
Adds empty position-controller step. |
empty_4.6.x_mig/65_guided_operation.param |
Adds empty guided-operation step. |
empty_4.6.x_mig/66_precision_land.param |
Adds empty precision-land step. |
empty_4.6.x_mig/67_optical_flow_setup.param |
Adds empty optical-flow setup. |
empty_4.6.x_mig/68_optical_flow_results.param |
Adds empty optical-flow results. |
empty_4.6.x_mig/69_use_optical_flow_instead_of_gnss.param |
Adds empty optical-flow selection. |
empty_4.6.x_mig/70_everyday_use.param |
Adds empty everyday-use step. |
empty_4.6.x_mig/configuration_steps_ArduCopter.json |
Defines empty format-2 workflow. |
empty_4.6.x_mig/vehicle_components.json |
Defines empty-template metadata. |
scripts/create_empty_template_from_normal_template.py |
Supports creating migrated templates. |
tests/plugins/conftest.py |
Adds RC plugin fixtures. |
tests/plugins/test_data_model_rc_calibration.py |
Tests RC model behavior. |
tests/plugins/test_frontend_tkinter_rc_calibration.py |
Tests the RC GUI. |
tests/plugins/test_renderer_3d_quadcopter.py |
Tests the renderer. |
tests/test_backend_filesystem_migration.py |
Tests migration behavior. |
tests/test_configuration_steps_schema.py |
Validates format-2 steps. |
tests/test_create_empty_template_from_normal_template.py |
Tests template creation. |
tests/test_data_model_parameter_editor.py |
Tests metadata-choice access. |
tests/test_holybro_x500_template_migration.py |
Verifies X500 migration output. |
tests/test_param_reorder.py |
Tests safe step reordering. |
tests/test_vehicle_template_param_files.py |
Validates format-specific prefixes. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| ( | ||
| "14_mp_setup_mandatory_hardware.param", | ||
| "14_accelerometer_calibration.param", | ||
| [r"INS_ACC(?:[2-5])?OFFS_[XYZ]", r"INS_ACC(?:[2-3])?SCAL_[XYZ]", r"INS_USE[2-3]?"], |
| return False, _("Select an RC mapping mode from 1 to 4.") | ||
| success, message = self._stage_parameters( | ||
| RC_MAP_PRESETS[mode], _("RC mapping preset Mode %(mode)d selected in the RC calibration plugin.") % {"mode": mode} | ||
| ) | ||
| if success: | ||
| message += " " + _("RC mapping changes require a flight-controller reboot after upload.") |
Test Results 2 files 2 suites 30m 25s ⏱️ Results for commit edc89d9. ♻️ This comment has been updated with latest results. |
Previous review (2026-10-06)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Thanks for this. The staged v2 layout and the RC preview are a nice direction. One thing should be fixed before merge, plus a few smaller items. Must fix: the v1->v2 move/copy/delete tables sit under "all" (R325). I copied ArduPlane/normal_plane and Rover/AION_R1 and set the format target to 2, the same way the PR's tests do. Both projects gained 14_accelerometer_calibration/15_accelerometer_level/16_compass_calibration files that are not steps for those vehicles. The delete list at R403 also removed FENCE_ACTION, FENCE_ALT_MAX, FENCE_ENABLE and FENCE_RADIUS from 14_mp_setup_mandatory_hardware.param, which is the only user step file holding them. Keying these tables by ArduCopter, or skipping the v2 split for vehicle types without a v2 layout, would avoid this. Smaller items:
I am not asking for the locale catalogs to be updated, since the ai-translation workflow regenerates them on master. CI shows 7 errors at 222edf3, and I have not checked whether they relate to this PR. |
222edf3 to
a3e4814
Compare
☂️ Code Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
Previous review (2026-10-06)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Thanks for slimming this down to the RC plugin. The staged-upload flow is a clear improvement over writing straight to the FC. Must fix: test_migration_templates_expose_editable_rc_mapping_in_controller_step (R954) still uses the Holybro_X500_mig and empty_4.6.x_mig templates, which are no longer in this PR. Both cases fail with FileNotFoundError at R965. I get 2 failed, 79 passed locally, which matches the 2 failures CI reports for a3e4814. Please drop or defer that test until the templates land. Please also update the template rows in ARCHITECTURE_rc_calibration.md (R114 to R116, R313, R350). Note that no shipped configuration step enables rc_calibration yet. Smaller items:
The earlier migration findings no longer apply, since that code has left the PR. I'm still not asking for locale catalog updates. |
450dece to
2c9d243
Compare
|
Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Thanks for the update. The failing migration-template test is gone, and channels that never moved are no longer staged as MIN=MAX=TRIM, so the earlier must-fix is resolved at 2c9d243. Remaining items, none blocking:
Not checked: real display, transmitter/FC/SITL, full test suite, and CI for this head, which was still pending. |
2c9d243 to
f945d3d
Compare
- Display all 16 RC channels with PWM readouts and MIN/TRIM/MAX markers - Add RC mapping presets and channel-function controls, staging edits until parameter upload - Drive stick and quadcopter previews from mapped RC inputs - Expose firmware enum choices through ParameterEditor and document the plugin - Add regression tests for the data model, UI, renderer Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
f945d3d to
9d0dce2
Compare


Description
Improve the RC calibration plugin
Requires #2133
Fixes #1754
Checklist
git commit --signoff)Testing
Describe how you tested these changes: