diff --git a/docs/assets/setup/Motors.png b/docs/assets/setup/Motors.png index fe6234eecc6..d0842a7054d 100644 Binary files a/docs/assets/setup/Motors.png and b/docs/assets/setup/Motors.png differ diff --git a/src/AutoPilotPlugins/APM/APMMotorComponent.qml b/src/AutoPilotPlugins/APM/APMMotorComponent.qml index 0a946a62ad9..8fa4fba8b75 100644 --- a/src/AutoPilotPlugins/APM/APMMotorComponent.qml +++ b/src/AutoPilotPlugins/APM/APMMotorComponent.qml @@ -43,13 +43,6 @@ SetupPage { Row { Column { - - QGCLabel { - id: labelThrottle - anchors.horizontalCenter: parent.horizontalCenter - text: qsTr("Throttle") + " " + sliderThrottle.value + " " + qsTr("%") - } - Row { id: motorSlider enabled: safetySwitch.checked @@ -57,29 +50,27 @@ SetupPage { QGCButton { anchors.verticalCenter: parent.verticalCenter - id: minusMinusButton + id: minusButton text: qsTr("-") - onClicked: sliderThrottle.value-=1 + onClicked: sliderThrottle.setValue(sliderThrottle.value-1) } - QGCSlider { - id: sliderThrottle - width: ScreenTools.defaultFontPixelHeight * _sliderWidth - orientation: Qt.Horizontal - anchors.verticalCenter: parent.verticalCenter - from: 0 - to: 100 - stepSize: 1 - value: 0 - live: false - displayValue: true + ValueSlider { + id: sliderThrottle + width: motorButtons.width - minusButton.width - plusButton.width - ScreenTools.defaultFontPixelWidth * 4 * 2 + label: qsTr("Throttle") + from: 0 + to: 100 + majorTickStepSize: 5 + decimalPlaces: 0 + unitsString: qsTr("%") } QGCButton { anchors.verticalCenter: parent.verticalCenter id: plusButton text: qsTr("+") - onClicked: sliderThrottle.value+=1 + onClicked: sliderThrottle.setValue(sliderThrottle.value+1) } } // Row } // Column @@ -139,7 +130,7 @@ SetupPage { id: safetySwitch onClicked: { if (!checked) { - sliderThrottle.value = 0 + sliderThrottle.setValue(0); } } } diff --git a/src/AutoPilotPlugins/Common/MotorComponent.qml b/src/AutoPilotPlugins/Common/MotorComponent.qml index 0caf6d9f0ec..faf7c3bf020 100644 --- a/src/AutoPilotPlugins/Common/MotorComponent.qml +++ b/src/AutoPilotPlugins/Common/MotorComponent.qml @@ -43,13 +43,6 @@ SetupPage { Row { Column { - - QGCLabel { - id: labelThrottle - anchors.horizontalCenter: parent.horizontalCenter - text: qsTr("Throttle") + " " + sliderThrottle.value + " " + qsTr("%") - } - Row { id: motorSlider enabled: safetySwitch.checked @@ -57,29 +50,27 @@ SetupPage { QGCButton { anchors.verticalCenter: parent.verticalCenter - id: minusMinusButton + id: minusButton text: qsTr("-") - onClicked: sliderThrottle.value-=1 + onClicked: sliderThrottle.setValue(sliderThrottle.value-1) } - QGCSlider { - id: sliderThrottle - width: ScreenTools.defaultFontPixelHeight * _sliderWidth - orientation: Qt.Horizontal - anchors.verticalCenter: parent.verticalCenter - from: 0 - to: 100 - stepSize: 1 - value: 0 - live: false - displayValue: true + ValueSlider { + id: sliderThrottle + width: motorButtons.width - minusButton.width - plusButton.width - ScreenTools.defaultFontPixelWidth * 4 * 2 + label: qsTr("Throttle") + from: 0 + to: 100 + majorTickStepSize: 5 + decimalPlaces: 0 + unitsString: qsTr("%") } QGCButton { anchors.verticalCenter: parent.verticalCenter id: plusButton text: qsTr("+") - onClicked: sliderThrottle.value+=1 + onClicked: sliderThrottle.setValue(sliderThrottle.value+1) } } // Row } // Column @@ -139,7 +130,7 @@ SetupPage { id: safetySwitch onClicked: { if (!checked) { - sliderThrottle.value = 0 + sliderThrottle.setValue(0); } } }