Skip to content

Conversation

@DonLakeFlyer
Copy link
Collaborator

  • Both Joystick and RC calibration share the same base class code and ui
  • The changes should be functionally equivalent to previous support
  • Joystick has a new settings format. Legacy settings are migrated one time
  • One small functional difference is that Joystick always shows up in Vehicle Setup even when there are no joysticks

Coming in a later pull:

  • I'm not super happy with settings ui. But it's functional for now. I'll continue to fix it up.
  • ArduSub JS button support has not been converted over yet.
  • I want to add gimbal axis display just like roll/pitch/yaw/throttle
  • I'm considering adding a joystick indicator to the toolbar to indicate readiness
  • Gimbal pitch/roll is hardwired to axis 4/5 like it was before. This should be configured through stick detection

Screenshot 2025-12-30 at 11 24 46 AM

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR represents a complete rewrite of the Joystick and RC calibration systems, unifying them under a shared base class architecture. The changes consolidate duplicate code, introduce a new settings format for joysticks with one-time legacy migration, and restructure the UI to share common calibration components.

Key changes:

  • Unified calibration base class (RemoteControlCalibrationController) for both RC and Joystick
  • New settings-based configuration replacing direct QSettings access
  • Restructured QML components for better code reuse
  • Thread-safe Fact class implementation with mutex protection
  • Refactored joystick management with per-vehicle enable state

Reviewed changes

Copilot reviewed 67 out of 70 changed files in this pull request and generated no comments.

Show a summary per file
File Description
RemoteControlCalibrationController.h/cc Core base class for calibration with significant API changes including signal renames and new properties
RemoteControlCalibration.qml Unified calibration UI component shared by RC and Joystick
RemoteControlChannelValueDisplay.qml New reusable channel value visualization component
RemoteControlChannelMonitor.qml New raw channel monitor component
JoystickConfigController.h/cc Drastically simplified to inherit from base calibration controller
JoystickSettings.h/cc New settings class for per-joystick configuration
JoystickManagerSettings.h/cc New settings class for manager-level joystick state
JoystickComponent.h/cc/qml New vehicle component for joystick setup UI integration
Joystick.h/cc Major refactoring with settings integration and polling mode changes
JoystickManager.h/cc Refactored joystick discovery and per-vehicle enable management
Vehicle.h/cc Removed joystick-specific code, changed RC channel signal signatures
SettingsGroup.h/cc Minor improvements to settings infrastructure
Fact.h/cc Added thread-safety with recursive mutex
QmlObjectListModel split New ObjectListModelBase for code reuse
SetupView.qml Removed hardcoded joystick button (now part of vehicle components)
Various AutoPilotPlugin files Integration of new JoystickComponent
RadioComponentController.cc Updated to use new base class APIs

@github-actions
Copy link
Contributor

github-actions bot commented Dec 30, 2025

Pre-commit Checks Failed

Status Count
Passed 13
Failed 45
Hook Results
check yaml...............................................................Passed
check json...............................................................Passed
pretty format json.......................................................Failed
check xml................................................................Passed
check for merge conflicts................................................Passed
check for added large files..............................................Passed
trim trailing whitespace.................................................Passed
fix end of files.........................................................Failed
mixed line ending........................................................Passed
TruffleHog...............................................................Passed
clang-format.............................................................Failed
clang-tidy...............................................................Failed
ruff (legacy alias)......................................................Failed
ruff format..............................................................Failed
pyright..................................................................Failed
shellcheck...............................................................Failed
cmake-format.............................................................Failed
cmake-lint...............................................................Failed
Lint GitHub Actions workflow files.......................................Failed
yamllint.................................................................Passed
markdownlint.............................................................Failed
vale.....................................................................Failed
typos....................................................................Failed
Lint QML files...........................................................Failed
Qt static analysis (clazy)...............................................Passed
Check for Q_ASSERT in production code....................................Passed
Check vehicle null safety................................................Failed
Files Modified by Hooks
 .github/workflows/pr-checks.yml | 1 -
 1 file changed, 1 deletion(-)

How to Fix

./tools/pre-commit.sh
git add -u && git commit --amend --no-edit

Run ID: 20680604922

@github-actions
Copy link
Contributor

github-actions bot commented Dec 30, 2025

Build Results

Platform Status

Platform Status Details
Linux Passed View
Windows Passed View
MacOS Passed View
Android Passed View

All builds passed.

Artifact Sizes

Artifact Size
QGroundControl-mac.apk 414.75 MB
QGroundControl-windows.apk 413.61 MB
QGroundControl.apk 769.96 MB

No baseline available for comparison

Updated: 2026-01-03 18:10:18 UTC • Triggered by: Android

@DonLakeFlyer
Copy link
Collaborator Author

DonLakeFlyer commented Dec 31, 2025

@Niki-dev12, @ikalnytskyi Hey can you guys help test this out? After this merges in then I'll move over @Niki-dev12 other gimbal work into this: #13280

@ikalnytskyi
Copy link
Contributor

@DonLakeFlyer I'll have some time to test it tomorrow. Thank you for letting me know!

@ikalnytskyi
Copy link
Contributor

@DonLakeFlyer I finally had a chance to test this. The extra gimbal axes (pitch/roll) are detected separately (axes 5 and 6), but only one axis is actually sent in the MANUAL_CONTROL message. Its value ends up in both MANUAL_CONTROL.s and MANUAL_CONTROL.t, which isn't expected. Could this be because we don't prompt the user to assign a function to them anymore?

@DonLakeFlyer
Copy link
Collaborator Author

DonLakeFlyer commented Jan 3, 2026

The extra gimbal axes (pitch/roll) are detected separately (axes 5 and 6), but only one axis is actually sent in the MANUAL_CONTROL message. Its value ends up in both MANUAL_CONTROL.s and MANUAL_CONTROL.t, which isn't expected.

Fixed

Could this be because we don't prompt the user to assign a function to them anymore?

Not sure what you mean here? In the old code I thought there was just a manual control extensions setting. That still exists in the new ui. What prompt are you talking about? Maybe I missed something.

* Both Joystick and RC calibration share the same base class code and ui
* The changes should be functionally equivalent to previous support
* Joystick has a new settings format. Legacy settings are migrated one time
* One small functional difference is that Joystick always shows up in Vehicle Setup even when there are no joysticks

Coming in a later pull:
* I'm not super happy with settings ui. But it's functional for now. I'll continue to fix it up.
* ArduSub JS button support has not been converted over yet.
* I want to add gimbal axis display just like roll/pitch/yaw/throttle
* I'm considering adding a joystick indicator to the toolbar to indicate readiness
* Gimbal pitch/roll is hardwired to axis 4/5 like it was before. This should be configured through stick detection
@ikalnytskyi
Copy link
Contributor

Fixed

Thanks! It works now.

Not sure what you mean here? In the old code I thought there was just a manual control extensions setting. That still exists in the new ui. What prompt are you talking about? Maybe I missed something.

I was referring to a calibration step, not a prompt. In the old flow, the user was asked to move the gimbal pitch stick first (up/down), and then the gimbal roll stick. That step is what determined which physical stick was assigned to which function. There's also a chance this was changed later, I was still using an early Daily Build. So I’m wondering how the function is chosen now.

@DonLakeFlyer
Copy link
Collaborator Author

In the old flow, the user was asked to move the gimbal pitch stick first (up/down), and then the gimbal roll stick.

You're right. I screwed that up. The gimbal axes are hardwired in this version. I'll fix that up in another pull to get that functionality back.

@DonLakeFlyer DonLakeFlyer merged commit 4e32036 into master Jan 4, 2026
22 of 25 checks passed
@DonLakeFlyer DonLakeFlyer deleted the Joystick branch January 4, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants