Commit fdfb5a3e authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #5191 from bluerobotics/sub-safety-page

Rework Sub Safety setup
parents 1ab55919 b77f0b98
......@@ -14,14 +14,24 @@ FactPanel {
QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
FactPanelController { id: controller; factPanel: panel }
// Enable/Action parameters
property Fact _failsafeBatteryEnable: controller.getParameterFact(-1, "FS_BATT_ENABLE")
property Fact _failsafeEKFEnable: controller.getParameterFact(-1, "FS_EKF_ACTION")
property Fact _failsafeGCSEnable: controller.getParameterFact(-1, "FS_GCS_ENABLE")
property Fact _failsafeLeakEnable: controller.getParameterFact(-1, "FS_LEAK_ENABLE")
property Fact _failsafePilotEnable: controller.getParameterFact(-1, "FS_PILOT_INPUT")
property Fact _failsafePressureEnable: controller.getParameterFact(-1, "FS_PRESS_ENABLE")
property Fact _failsafeTemperatureEnable: controller.getParameterFact(-1, "FS_TEMP_ENABLE")
property Fact _fenceAction: controller.getParameterFact(-1, "FENCE_ACTION")
property Fact _fenceEnable: controller.getParameterFact(-1, "FENCE_ENABLE")
property Fact _fenceType: controller.getParameterFact(-1, "FENCE_TYPE")
property Fact _leakPin: controller.getParameterFact(-1, "LEAK1_PIN")
// Threshold parameters
property Fact _failsafePressureThreshold: controller.getParameterFact(-1, "FS_PRESS_MAX")
property Fact _failsafeTemperatureThreshold: controller.getParameterFact(-1, "FS_TEMP_MAX")
property Fact _failsafePilotTimeout: controller.getParameterFact(-1, "FS_PILOT_TIMEOUT")
property Fact _failsafeLeakPin: controller.getParameterFact(-1, "LEAK1_PIN")
property Fact _failsafeLeakLogic: controller.getParameterFact(-1, "LEAK1_LOGIC")
property Fact _failsafeEKFThreshold: controller.getParameterFact(-1, "FS_EKF_THRESH")
property Fact _failsafeBatteryVoltage: controller.getParameterFact(-1, "FS_BATT_VOLTAGE")
property Fact _failsafeBatteryCapacity: controller.getParameterFact(-1, "FS_BATT_MAH")
property Fact _armingCheck: controller.getParameterFact(-1, "ARMING_CHECK")
......@@ -32,35 +42,33 @@ FactPanel {
labelText: qsTr("Arming Checks:")
valueText: _armingCheck.value & 1 ? qsTr("Enabled") : qsTr("Some disabled")
}
VehicleSummaryRow {
labelText: qsTr("GCS failsafe:")
valueText: _failsafeGCSEnable.enumOrValueString
}
VehicleSummaryRow {
labelText: qsTr("Leak failsafe:")
valueText: _failsafeLeakEnable.enumOrValueString
}
VehicleSummaryRow {
labelText: qsTr("Leak detector:")
valueText: _leakPin.enumOrValueString
labelText: qsTr("Battery failsafe:")
valueText: _failsafeBatteryEnable.enumOrValueString
}
VehicleSummaryRow {
labelText: qsTr("GeoFence:")
valueText: _fenceEnable.value == 0 || _fenceType == 0 ?
qsTr("Disabled") :
(_fenceType.value == 1 ?
qsTr("Depth") :
(_fenceType.value == 2 ? qsTr("Circle") : qsTr("Depth,Circle")))
labelText: qsTr("EKF failsafe:")
valueText: _failsafeEKFEnable.enumOrValueString
}
VehicleSummaryRow {
labelText: qsTr("Pilot Input failsafe:")
valueText: _failsafePilotEnable.enumOrValueString
}
VehicleSummaryRow {
labelText: qsTr("Int. Temperature failsafe:")
valueText: _failsafeTemperatureEnable.enumOrValueString
}
VehicleSummaryRow {
labelText: qsTr("GeoFence:")
valueText: qsTr("Report only")
visible: _fenceEnable.value != 0
labelText: qsTr("Int. Pressure failsafe:")
valueText: _failsafePressureEnable.enumOrValueString
}
}
}
......@@ -51,7 +51,7 @@ FactPanel {
VehicleSummaryRow {
labelText: qsTr("Firmware Version:")
valueText: activeVehicle.firmwareMajorVersion == -1 ? qsTr("Unknown") : activeVehicle.firmwareMajorVersion + "." + activeVehicle.firmwareMinorVersion + "." + activeVehicle.firmwarePatchVersion + "-" + activeVehicle.firmwareVersionTypeString
valueText: activeVehicle.firmwareMajorVersion == -1 ? qsTr("Unknown") : activeVehicle.firmwareMajorVersion + "." + activeVehicle.firmwareMinorVersion + "." + activeVehicle.firmwarePatchVersion + " " + activeVehicle.firmwareVersionTypeString
}
VehicleSummaryRow {
......
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