|
|
@ -43,12 +43,12 @@ SetupPage { |
|
|
|
property Fact _rateClimbP: controller.getParameterFact(-1, "r.PSC_ACCZ_P") |
|
|
|
property Fact _rateClimbP: controller.getParameterFact(-1, "r.PSC_ACCZ_P") |
|
|
|
property Fact _rateClimbI: controller.getParameterFact(-1, "r.PSC_ACCZ_I") |
|
|
|
property Fact _rateClimbI: controller.getParameterFact(-1, "r.PSC_ACCZ_I") |
|
|
|
|
|
|
|
|
|
|
|
property Fact _ch7Opt: controller.getParameterFact(-1, "CH7_OPT") |
|
|
|
property Fact _ch7Opt: controller.getParameterFact(-1, "r.RC7_OPTION") |
|
|
|
property Fact _ch8Opt: controller.getParameterFact(-1, "CH8_OPT") |
|
|
|
property Fact _ch8Opt: controller.getParameterFact(-1, "r.RC8_OPTION") |
|
|
|
property Fact _ch9Opt: controller.getParameterFact(-1, "CH9_OPT") |
|
|
|
property Fact _ch9Opt: controller.getParameterFact(-1, "r.RC9_OPTION") |
|
|
|
property Fact _ch10Opt: controller.getParameterFact(-1, "CH10_OPT") |
|
|
|
property Fact _ch10Opt: controller.getParameterFact(-1, "r.RC10_OPTION") |
|
|
|
property Fact _ch11Opt: controller.getParameterFact(-1, "CH11_OPT") |
|
|
|
property Fact _ch11Opt: controller.getParameterFact(-1, "r.RC11_OPTION") |
|
|
|
property Fact _ch12Opt: controller.getParameterFact(-1, "CH12_OPT") |
|
|
|
property Fact _ch12Opt: controller.getParameterFact(-1, "r.RC12_OPTION") |
|
|
|
|
|
|
|
|
|
|
|
readonly property int _firstOptionChannel: 7 |
|
|
|
readonly property int _firstOptionChannel: 7 |
|
|
|
readonly property int _lastOptionChannel: 12 |
|
|
|
readonly property int _lastOptionChannel: 12 |
|
|
@ -84,12 +84,12 @@ SetupPage { |
|
|
|
calcAutoTuneChannel() |
|
|
|
calcAutoTuneChannel() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// The AutoTune switch is stored in one of the CH#_OPT parameters. We need to loop through those |
|
|
|
/// The AutoTune switch is stored in one of the RC#_OPTION parameters. We need to loop through those |
|
|
|
/// to find them and setup the ui accordindly. |
|
|
|
/// to find them and setup the ui accordindly. |
|
|
|
function calcAutoTuneChannel() { |
|
|
|
function calcAutoTuneChannel() { |
|
|
|
_autoTuneSwitchChannelIndex = 0 |
|
|
|
_autoTuneSwitchChannelIndex = 0 |
|
|
|
for (var channel=_firstOptionChannel; channel<=_lastOptionChannel; channel++) { |
|
|
|
for (var channel=_firstOptionChannel; channel<=_lastOptionChannel; channel++) { |
|
|
|
var optionFact = controller.getParameterFact(-1, "CH" + channel + "_OPT") |
|
|
|
var optionFact = controller.getParameterFact(-1, "r.RC" + channel + "_OPTION") |
|
|
|
if (optionFact.value == _autoTuneOption) { |
|
|
|
if (optionFact.value == _autoTuneOption) { |
|
|
|
_autoTuneSwitchChannelIndex = channel - _firstOptionChannel + 1 |
|
|
|
_autoTuneSwitchChannelIndex = channel - _firstOptionChannel + 1 |
|
|
|
break |
|
|
|
break |
|
|
@ -101,7 +101,7 @@ SetupPage { |
|
|
|
function setChannelAutoTuneOption(channel) { |
|
|
|
function setChannelAutoTuneOption(channel) { |
|
|
|
// First clear any previous settings for AutTune |
|
|
|
// First clear any previous settings for AutTune |
|
|
|
for (var optionChannel=_firstOptionChannel; optionChannel<=_lastOptionChannel; optionChannel++) { |
|
|
|
for (var optionChannel=_firstOptionChannel; optionChannel<=_lastOptionChannel; optionChannel++) { |
|
|
|
var optionFact = controller.getParameterFact(-1, "CH" + optionChannel + "_OPT") |
|
|
|
var optionFact = controller.getParameterFact(-1, "r.RC" + optionChannel + "_OPTION") |
|
|
|
if (optionFact.value == _autoTuneOption) { |
|
|
|
if (optionFact.value == _autoTuneOption) { |
|
|
|
optionFact.value = 0 |
|
|
|
optionFact.value = 0 |
|
|
|
} |
|
|
|
} |
|
|
@ -109,7 +109,7 @@ SetupPage { |
|
|
|
|
|
|
|
|
|
|
|
// Now set the function into the new channel |
|
|
|
// Now set the function into the new channel |
|
|
|
if (channel != 0) { |
|
|
|
if (channel != 0) { |
|
|
|
var optionFact = controller.getParameterFact(-1, "CH" + channel + "_OPT") |
|
|
|
var optionFact = controller.getParameterFact(-1, "r.RC" + channel + "_OPTION") |
|
|
|
optionFact.value = _autoTuneOption |
|
|
|
optionFact.value = _autoTuneOption |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -368,7 +368,7 @@ SetupPage { |
|
|
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
QGCLabel { |
|
|
|
anchors.baseline: optCombo.baseline |
|
|
|
anchors.baseline: optCombo.baseline |
|
|
|
text: qsTr("Channel Option 6 (Tuning):") |
|
|
|
text: qsTr("RC Channel 6 Option (Tuning):") |
|
|
|
//color: controller.channelOptionEnabled[modelData] ? "yellow" : qgcPal.text |
|
|
|
//color: controller.channelOptionEnabled[modelData] ? "yellow" : qgcPal.text |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|