Allow setting VC for on-final start
This commit is contained in:
parent
aa61c55168
commit
1a7f513fb1
3 changed files with 37 additions and 1 deletions
|
@ -1031,6 +1031,10 @@ void LocationController::onCollectConfig()
|
||||||
m_config->setArg("glideslope", std::string("3.0"));
|
m_config->setArg("glideslope", std::string("3.0"));
|
||||||
m_config->setArg("offset-distance", QString::number(m_offsetNm));
|
m_config->setArg("offset-distance", QString::number(m_offsetNm));
|
||||||
m_config->setArg("on-ground", std::string("false"));
|
m_config->setArg("on-ground", std::string("false"));
|
||||||
|
|
||||||
|
if (m_speedEnabled) {
|
||||||
|
m_config->setArg("vc", QString::number(m_airspeedKnots));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (m_airportLocation->type() == FGPositioned::HELIPORT) {
|
} else if (m_airportLocation->type() == FGPositioned::HELIPORT) {
|
||||||
m_config->setArg("runway", QString::fromStdString(m_detailLocation->ident()));
|
m_config->setArg("runway", QString::fromStdString(m_detailLocation->ident()));
|
||||||
|
|
|
@ -161,6 +161,8 @@ Item {
|
||||||
// no offset for helipads
|
// no offset for helipads
|
||||||
visible: !isHeliport
|
visible: !isHeliport
|
||||||
|
|
||||||
|
readonly property bool enableOnFinal: runwayRadio.selected && _location.onFinal
|
||||||
|
|
||||||
ToggleSwitch {
|
ToggleSwitch {
|
||||||
id: onFinalToggle
|
id: onFinalToggle
|
||||||
label: qsTr("On final approach at ")
|
label: qsTr("On final approach at ")
|
||||||
|
@ -183,12 +185,40 @@ Item {
|
||||||
live: true
|
live: true
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
enabled: runwayRadio.selected && onFinalToggle.checked
|
enabled: parent.enableOnFinal
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: qsTr(" from the threshold")
|
text: qsTr(" from the threshold")
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
enabled: parent.enableOnFinal
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
// padding
|
||||||
|
width: Style.strutSize
|
||||||
|
height: 1
|
||||||
|
}
|
||||||
|
|
||||||
|
ToggleSwitch {
|
||||||
|
id: airspeedToggle
|
||||||
|
enabled: parent.enableOnFinal
|
||||||
|
checked: _location.speedEnabled
|
||||||
|
onCheckedChanged: _location.speedEnabled = checked;
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
IntegerSpinbox {
|
||||||
|
label: qsTr("Airspeed:")
|
||||||
|
suffix: "kts"
|
||||||
|
min: 0
|
||||||
|
max: 10000 // more for spaceships?
|
||||||
|
step: 5
|
||||||
|
maxDigits: 5
|
||||||
|
enabled: _location.speedEnabled && parent.enableOnFinal
|
||||||
|
value: _location.airspeedKnots
|
||||||
|
onCommit: _location.airspeedKnots = newValue
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,6 +226,7 @@ Item {
|
||||||
x: Style.strutSize
|
x: Style.strutSize
|
||||||
// no localizer for helipads
|
// no localizer for helipads
|
||||||
visible: !isHeliport
|
visible: !isHeliport
|
||||||
|
enabled:runwayRadio.selected
|
||||||
|
|
||||||
// enable if selected runway has ILS
|
// enable if selected runway has ILS
|
||||||
label: qsTr("Tune navigation radio (NAV1) to runway localizer")
|
label: qsTr("Tune navigation radio (NAV1) to runway localizer")
|
||||||
|
|
|
@ -3,6 +3,7 @@ import QtQuick 2.4
|
||||||
import "."
|
import "."
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
id: root
|
||||||
font.pixelSize: Style.baseFontPixelSize
|
font.pixelSize: Style.baseFontPixelSize
|
||||||
|
|
||||||
property bool enabled: true
|
property bool enabled: true
|
||||||
|
|
Loading…
Add table
Reference in a new issue