propertyint_checkState:_activeVehicle?(_activeVehicle.armed?1+(buttonActuators._state+buttonMotors._state+buttonMission._state+buttonSoundOutput._state)/4/4:0):0;// Shows progress of checks inside the checklist - unlocks next check steps in groups
QGCLabel{text:qsTr("<i>Please arm the vehicle here.</i>");opacity:0.2+0.8*(QGroundControl.multiVehicleManager.vehicles.count>0);anchors.horizontalCenter:buttonHardware.horizontalCenter;anchors.topMargin:40;anchors.bottomMargin:40;}
QGCCheckListItem{
id:buttonActuators
name:"Actuators"
group:1
defaulttext:"Move all control surfaces. Did they work properly?"
}
QGCCheckListItem{
id:buttonMotors
name:"Motors"
group:1
defaulttext:"Propellers free? Then throttle up gently. Working properly?"
}
QGCCheckListItem{
id:buttonMission
name:"Mission"
group:1
defaulttext:"Please confirm mission is valid (waypoints valid, no terrain collision)."
}
QGCCheckListItem{
id:buttonSoundOutput
name:"Sound output"
group:1
pendingtext:"QGC audio output enabled. System audio output enabled, too?"
failuretext:"Failure, QGC audio output is disabled. Please enable it under application settings->general to hear audio warnings!"
functionupdateItem(){
if(!_activeVehicle){
_state=0;
}else{
if(audioMuted){_state=3;_nrClicked=0;}
else{_state=1+3*(_nrClicked>0);}
}
}
}
// Check list item group 2 - Final checks before launch
QGCLabel{text:qsTr("<i>Last preparations before launch</i>");opacity:0.2+0.8*(_checkState>=2);anchors.horizontalCenter:buttonHardware.horizontalCenter}
QGCCheckListItem{
id:buttonPayload
name:"Payload"
group:2
defaulttext:"Configured and started?"
pendingtext:"Payload lid closed?"
}
QGCCheckListItem{
id:buttonWeather
name:"Wind & weather"
group:2
defaulttext:"OK for your platform?"
pendingtext:"Launching into the wind?"
}
QGCCheckListItem{
id:buttonFlightAreaFree
name:"Flight area"
group:2
defaulttext:"Launch area and path free of obstacles/people?"
//_dropDownComponent = undefined //TODO (philippoe) such that drop down component state is not deleted - check with don gagne whether this is necessary
// onEnabledChanged: { //Dont do this for now, because if we only accidentially lose connection, we don't want to delete the checklist state. Instead, we'd need to detect a re-connect, maybe based on the timesincesystemstart (i.e. when it decreases)?
// if(enabled==false && group > 0) {
// // Reset all check list items of group > 0 if it is disabled again (which e.g. happens after a vehicle reboot or disarm).
// _nrClicked = 0;
// _state = 0;
// }
// }
//Functions
functionupdateItem(){
functionupdateItem(){
// This is the default updateFunction. It assumes the item is a MANUAL check list item, i.e. one that
// This is the default updateFunction. It assumes the item is a MANUAL check list item, i.e. one that
// only requires user clicks (one click if pendingtext="", two clicks otherwise) for completion.
// only requires user clicks (one click if pendingtext="", two clicks otherwise) for completion.
//if(_nrClicked>0) _state = 4;
if(_nrClicked===1){
if(_nrClicked===0)_state=0;
elseif(_nrClicked===1){
if(pendingtext.length===0)_state=4;
if(pendingtext.length===0)_state=4;
else_state=1;
else_state=1;
}elseif(_nrClicked>1)_state=4;
}else_state=4;
getTextFromState();
getTextFromState();
getColorFromState();
getColorFromState();
}
}
functiongetTextFromState(){
functiongetTextFromState(){
if(_state===0){_text=qsTr(name)+": "+qsTr(defaulttext)}// Not checked yet
if(_state===0){_text=qsTr(name)+": "+qsTr(defaulttext)}// Not checked yet