Skip to content

Commit

Permalink
NavigationDispaly wind uses fd units set too
Browse files Browse the repository at this point in the history
  • Loading branch information
MishkaRogachev committed Aug 10, 2017
1 parent 261c9ae commit 874d4ce
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Item {
property real windDirection: 0
property real windSpeed: 0

property int speedUnits: settings.value("Gui/fdSpeedUnits")

implicitHeight: hsi.height

Indicators.DistanceLabel {
Expand All @@ -46,8 +48,13 @@ Item {
anchors.left: parent.left
width: parent.width * 0.2
prefix: qsTr("WIND")
value: windSpeed
suffix: qsTr("m/s")
value: {
switch (speedUnits) {
default:
case 0: return windSpeed;
case 1: return Helper.mpsToKph(windSpeed);
}
}
enabled: windSpeed > 0 // TODO: wind avability
}

Expand Down

0 comments on commit 874d4ce

Please sign in to comment.