Skip to content

Conversation

@Niki-dev12
Copy link
Contributor

Show calibrated joystick axis output in calibration screen

Description

This update chnages the joystick calibration UI by displaying real-time calibrated axis output values for Roll, Pitch, Yaw, and Throttle during and after calibration.
It helps verify that calibration is applied correctly.

Key changes

  • Added dynamic axis visualization (AxisMonitor) for each joystick channel.
  • Implemented helper functions (joyToAxis, joyToThrottleAxis) to apply clamping and mapping to QGC’s internal range
  • Integrated calibration reversal logic so UI reflects post-calibration orientation.
  • Updated Connections.onAxisValues to respond immediately to calibration changes.

Test Steps

  • Open Joystick Setup Calibration in QGroundControl.
  • Move Roll, Pitch, Yaw, and Throttle sticks after calibration.
  • Confirm that each Axis Monitor bar responds smoothly and in the correct direction.
  • Toggle Reverse on any axis and ensure the visualization flips
  • Verify that throttle range maps correctly from 0–1 to –32768..32768.

Checklist:

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@HTRamsey HTRamsey requested a review from Copilot October 10, 2025 06:12
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 enhances the joystick calibration UI by adding real-time visualization of calibrated axis output values. The changes help users verify that calibration is applied correctly by showing how the joystick inputs are processed after calibration settings are applied.

  • Added helper functions to apply clamping, mapping, and reversal logic to joystick inputs
  • Updated axis value connections to use calibrated values instead of raw inputs
  • Integrated calibration reversal settings into the real-time display

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@HTRamsey
Copy link
Collaborator

Looks like you removed the 0:1 range for thrust?

@DonLakeFlyer
Copy link
Contributor

@Niki-dev12 Just making sure I"m not missing something here. The only change here is that the channel display bars respect the reversed attribute right? Other than that they work exactly the same?

@Niki-dev12
Copy link
Contributor Author

@Niki-dev12 Just making sure I"m not missing something here. The only change here is that the channel display bars respect the reversed attribute right? Other than that they work exactly the same?

Before QML was showing raw joystick signal with a fixed formula, so any calibration changes (invert, min/max, center, deadzone, remap) applied in the controller layer did not affect what the QML drew. QGC was visualizing the pre-calibration values.

@Niki-dev12
Copy link
Contributor Author

Looks like you removed the 0:1 range for thrust?

The input range (0..1) is still assumed, but the polarity flipped compared to the old non negative thrust path.

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