// If only two positions don't set threshold at midrange. Setting to 0.25
// allows for this channel to work with either two or three position switch
varincrement=0.25
rc_offboard_th.value=0.25
varcurrentThreshold=0.0
inRedistribution=false
}
// Make sure we don't re-enter
if(loiterChannel!=0&&loiterChannel!=modeChannel){
inRedistribution=true
currentThreshold+=increment
rc_loiter_th.value=currentThreshold
// If only two positions don't set threshold at midrange. Setting to 0.25
// allows for this channel to work with either two or three position switch
rc_loiter_th.value=0.25
inRedistribution=false
}
if(posCtlChannel!=0&posCtlChannel!=modeChannel){
// If only two positions don't set threshold at midrange. Setting to 0.25
// allows for this channel to work with either two or three position switch
varincrement=0.25
varcurrentThreshold=0.0
// Make sure we don't re-enter
inRedistribution=true
currentThreshold+=increment
rc_posctl_th.value=currentThreshold
// If only two positions don't set threshold at midrange. Setting to 0.25
// allows for this channel to work with either two or three position switch
rc_posctl_th.value=0.25
inRedistribution=false
}
}
Column{
...
...
@@ -389,9 +371,10 @@ Item {
QGCLabel{
width:parent.width
text:"Flight Mode switches can be assigned to any channel which is not currently being used for attitude control. All channels are displayed below. "+
"You can drag Flight Modes from the Flight Modes section below to a channel and drop it there. You can also drag switches assigned to a channel "+
"to another channel or back to the Unassigned Switches section. The Switch Display section at the very bottom will show you the results of your Flight Mode setup."
text:"The Main Mode, Loiter and PostCtl switches can be assigned to any channel which is not currently being used for attitude control. The Return and Offboard switches must be assigned to their seperate channel. "+
"All channels are displayed below. "+
"You can drag Flight Modes from the Flight Modes section below to a channel and drop it there. You can also drag switches assigned to a channel "+
"to another channel or back to the Unassigned Switches section. The Switch Display section at the very bottom will show you the results of your Flight Mode setup."