-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Complete rewrite of Joystick/RC Cal and friends code #13818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 |
Pre-commit Checks Failed
Hook ResultsFiles Modified by HooksHow to Fix./tools/pre-commit.sh
git add -u && git commit --amend --no-editRun ID: 20680604922 |
Build ResultsPlatform Status
All builds passed. Artifact Sizes
No baseline available for comparisonUpdated: 2026-01-03 18:10:18 UTC • Triggered by: Android |
|
@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 |
|
@DonLakeFlyer I'll have some time to test it tomorrow. Thank you for letting me know! |
|
@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 |
Fixed
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
Thanks! It works now.
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. |
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. |
Coming in a later pull: