|
|
@ -147,67 +147,76 @@ RowLayout { |
|
|
|
id: sensorStatusInfoComponent |
|
|
|
id: sensorStatusInfoComponent |
|
|
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
Rectangle { |
|
|
|
width: mainLayout.width + (_margins * 2) |
|
|
|
width: flickable.width + (_margins * 2) |
|
|
|
height: mainLayout.height + (_margins * 2) |
|
|
|
height: flickable.height + (_margins * 2) |
|
|
|
radius: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
radius: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
color: qgcPal.window |
|
|
|
color: qgcPal.window |
|
|
|
border.color: qgcPal.text |
|
|
|
border.color: qgcPal.text |
|
|
|
|
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
QGCFlickable { |
|
|
|
id: mainLayout |
|
|
|
id: flickable |
|
|
|
anchors.margins: _margins |
|
|
|
anchors.margins: _margins |
|
|
|
anchors.top: parent.top |
|
|
|
anchors.top: parent.top |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.left: parent.left |
|
|
|
spacing: _spacing |
|
|
|
width: mainLayout.width |
|
|
|
|
|
|
|
height: mainWindow.contentItem.height - (indicatorPopup.padding * 2) - (_margins * 2) |
|
|
|
|
|
|
|
flickableDirection: Flickable.VerticalFlick |
|
|
|
|
|
|
|
contentHeight: mainLayout.height |
|
|
|
|
|
|
|
contentWidth: mainLayout.width |
|
|
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
ColumnLayout { |
|
|
|
Layout.alignment: Qt.AlignHCenter |
|
|
|
id: mainLayout |
|
|
|
text: qsTr("Sensor Status") |
|
|
|
spacing: _spacing |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GridLayout { |
|
|
|
QGCButton { |
|
|
|
rowSpacing: _spacing |
|
|
|
Layout.alignment: Qt.AlignHCenter |
|
|
|
columnSpacing: _spacing |
|
|
|
text: _armed ? qsTr("Disarm") : (forceArm ? qsTr("Force Arm") : qsTr("Arm")) |
|
|
|
rows: _activeVehicle.sysStatusSensorInfo.sensorNames.length |
|
|
|
|
|
|
|
flow: GridLayout.TopToBottom |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Repeater { |
|
|
|
property bool forceArm: false |
|
|
|
model: _activeVehicle.sysStatusSensorInfo.sensorNames |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
onPressAndHold: forceArm = true |
|
|
|
text: modelData |
|
|
|
|
|
|
|
|
|
|
|
onClicked: { |
|
|
|
|
|
|
|
if (_armed) { |
|
|
|
|
|
|
|
mainWindow.disarmVehicleRequest() |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (forceArm) { |
|
|
|
|
|
|
|
mainWindow.forceArmVehicleRequest() |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
mainWindow.armVehicleRequest() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
forceArm = false |
|
|
|
|
|
|
|
mainWindow.hideIndicatorPopup() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Repeater { |
|
|
|
QGCLabel { |
|
|
|
model: _activeVehicle.sysStatusSensorInfo.sensorStatus |
|
|
|
Layout.alignment: Qt.AlignHCenter |
|
|
|
|
|
|
|
text: qsTr("Sensor Status") |
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: modelData |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
GridLayout { |
|
|
|
Layout.alignment: Qt.AlignHCenter |
|
|
|
rowSpacing: _spacing |
|
|
|
text: _armed ? qsTr("Disarm") : (forceArm ? qsTr("Force Arm") : qsTr("Arm")) |
|
|
|
columnSpacing: _spacing |
|
|
|
|
|
|
|
rows: _activeVehicle.sysStatusSensorInfo.sensorNames.length |
|
|
|
|
|
|
|
flow: GridLayout.TopToBottom |
|
|
|
|
|
|
|
|
|
|
|
property bool forceArm: false |
|
|
|
Repeater { |
|
|
|
|
|
|
|
model: _activeVehicle.sysStatusSensorInfo.sensorNames |
|
|
|
|
|
|
|
|
|
|
|
onPressAndHold: forceArm = true |
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: modelData |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onClicked: { |
|
|
|
Repeater { |
|
|
|
if (_armed) { |
|
|
|
model: _activeVehicle.sysStatusSensorInfo.sensorStatus |
|
|
|
mainWindow.disarmVehicleRequest() |
|
|
|
|
|
|
|
} else { |
|
|
|
QGCLabel { |
|
|
|
if (forceArm) { |
|
|
|
text: modelData |
|
|
|
mainWindow.forceArmVehicleRequest() |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
mainWindow.armVehicleRequest() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
forceArm = false |
|
|
|
|
|
|
|
mainWindow.hideIndicatorPopup() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|