From 1169c0983a4409272e83c4d3848941a354609a8e Mon Sep 17 00:00:00 2001 From: nanthony21 Date: Sat, 25 Feb 2017 14:55:20 -0600 Subject: [PATCH] Mapped left column indicators to the manualControl signal that is sent to the vehicle --- src/VehicleSetup/JoystickConfig.qml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/VehicleSetup/JoystickConfig.qml b/src/VehicleSetup/JoystickConfig.qml index 066146b29..184379418 100644 --- a/src/VehicleSetup/JoystickConfig.qml +++ b/src/VehicleSetup/JoystickConfig.qml @@ -205,10 +205,13 @@ SetupPage { Connections { target: controller - onRollAxisValueChanged: rollLoader.item.axisValue = value - onRollAxisDeadbandChanged: rollLoader.item.deadbandValue = value } + Connections { + target: _activeJoystick + + onManualControl: rollLoader.item.axisValue = roll*32768.0 + } } Item { @@ -237,11 +240,14 @@ SetupPage { Connections { target: controller - onPitchAxisValueChanged: pitchLoader.item.axisValue = value - onPitchAxisDeadbandChanged: pitchLoader.item.deadbandValue = value } + Connections { + target: _activeJoystick + + onManualControl: pitchLoader.item.axisValue = pitch*32768.0 + } } Item { @@ -270,10 +276,13 @@ SetupPage { Connections { target: controller - onYawAxisValueChanged: yawLoader.item.axisValue = value - onYawAxisDeadbandChanged: yawLoader.item.deadbandValue = value } + Connections { + target: _activeJoystick + + onManualControl: yawLoader.item.axisValue = yaw*32768.0 + } } Item { @@ -302,10 +311,13 @@ SetupPage { Connections { target: controller - onThrottleAxisValueChanged: throttleLoader.item.axisValue = value - onThrottleAxisDeadbandChanged: throttleLoader.item.deadbandValue = value } + Connections { + target: _activeJoystick + + onManualControl: throttleLoader.item.axisValue = (-2*throttle+1)*32768.0 + } } } // Column - Attitude Control labels -- 2.22.0