Commit 13a9a09b authored by nanthony21's avatar nanthony21 Committed by Nick Anthony

Deadband bar now turns green when it has been clicked on.

parent 4c591cfb
......@@ -86,6 +86,7 @@ SetupPage {
property int axisValue: 0
property int deadbandValue: 0
property bool narrowIndicator: false
property color deadbandColor: "#8c161a"
property color __barColor: qgcPal.windowShade
......@@ -105,7 +106,7 @@ SetupPage {
x: _deadbandPosition
width: _deadbandWidth
height: parent.height / 2
color: "#8c161a"
color: deadbandColor
visible: controller.deadbandToggle
property real _percentDeadband: ((2 * deadbandValue) / (32768.0 * 2))
......@@ -801,11 +802,13 @@ SetupPage {
MouseArea {
id: deadbandMouseArea
anchors.fill: parent.item
enabled: controller.deadbandToggle
property real startY
onPressed: {
startY = mouseY
parent.item.deadbandColor = "#3C6315"
}
onPositionChanged: {
var newValue = parent.item.deadbandValue + (startY - mouseY)*15
......@@ -814,6 +817,7 @@ SetupPage {
}
onReleased: {
controller.setDeadbandValue(modelData,parent.item.deadbandValue)
parent.item.deadbandColor = "#8c161a"
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment