diff --git a/src/QmlControls/JoystickThumbPad.qml b/src/QmlControls/JoystickThumbPad.qml index de7b54e1831f4f4fe9a5f3fe8b73c5b7f660025b..6050f00b3ff1ff601acd480281f1abdd498f7c4b 100644 --- a/src/QmlControls/JoystickThumbPad.qml +++ b/src/QmlControls/JoystickThumbPad.qml @@ -11,15 +11,14 @@ Item { property real xAxis: 0 ///< Value range [-1,1], negative values left stick, positive values right stick property real yAxis: 0 ///< Value range [-1,1], negative values up stick, positive values down stick property bool yAxisThrottle: false ///< true: yAxis used for throttle, range [1,0], positive value are stick up + property bool yAxisThrottleCentered: false ///< false: center yAxis in throttle for reverser and forward property real xPositionDelta: 0 ///< Amount to move the control on x axis property real yPositionDelta: 0 ///< Amount to move the control on y axis - property bool throttle: false property real _centerXY: width / 2 property bool _processTouchPoints: false - property bool _stickCenteredOnce: false property real stickPositionX: _centerXY - property real stickPositionY: yAxisThrottle ? height : _centerXY + property real stickPositionY: yAxisThrottleCentered ? _centerXY : height QGCMapPalette { id: mapPal } @@ -50,7 +49,7 @@ Item { // Center sticks stickPositionX = _centerXY - if (!yAxisThrottle) { + if (yAxisThrottleCentered) { stickPositionY = _centerXY } } @@ -86,7 +85,7 @@ Item { QGCColoredImage { color: lightColors ? "white" : "black" - visible: throttle + visible: yAxisThrottle height: ScreenTools.defaultFontPixelHeight width: height sourceSize.height: height @@ -100,7 +99,7 @@ Item { QGCColoredImage { color: lightColors ? "white" : "black" - visible: throttle + visible: yAxisThrottle height: ScreenTools.defaultFontPixelHeight width: height sourceSize.height: height @@ -114,7 +113,7 @@ Item { QGCColoredImage { color: lightColors ? "white" : "black" - visible: throttle + visible: yAxisThrottle height: ScreenTools.defaultFontPixelHeight width: height sourceSize.height: height @@ -128,7 +127,7 @@ Item { QGCColoredImage { color: lightColors ? "white" : "black" - visible: throttle + visible: yAxisThrottle height: ScreenTools.defaultFontPixelHeight width: height sourceSize.height: height