Unverified Commit 62715ffe authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8446 from dakejahl/pr-patch/StableV4.0/offline_checklist

Preflight checklist when no vehicle is connected
parents ba521412 ae58e709
......@@ -66,24 +66,26 @@ Rectangle {
//-- Pick a checklist model that matches the current airframe type (if any)
function _updateModel() {
if(activeVehicle) {
if(activeVehicle.multiRotor) {
var vehicle = activeVehicle
if (!vehicle) {
vehicle = QGroundControl.multiVehicleManager.offlineEditingVehicle
}
if(vehicle.multiRotor) {
modelContainer.source = "/checklists/MultiRotorChecklist.qml"
} else if(activeVehicle.vtol) {
} else if(vehicle.vtol) {
modelContainer.source = "/checklists/VTOLChecklist.qml"
} else if(activeVehicle.rover) {
} else if(vehicle.rover) {
modelContainer.source = "/checklists/RoverChecklist.qml"
} else if(activeVehicle.sub) {
} else if(vehicle.sub) {
modelContainer.source = "/checklists/SubChecklist.qml"
} else if(activeVehicle.fixedWing) {
} else if(vehicle.fixedWing) {
modelContainer.source = "/checklists/FixedWingChecklist.qml"
} else {
modelContainer.source = "/checklists/DefaultChecklist.qml"
}
return
}
modelContainer.source = "/checklists/DefaultChecklist.qml"
}
Component.onCompleted: {
_updateModel()
......
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