Skip to content

Commit

Permalink
Merge branch 'bug-fix-#914' of https://github.com/styblope/XCSoar
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed May 31, 2022
2 parents e96790f + 04e4d29 commit 1e493d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.txt
Expand Up @@ -3,6 +3,7 @@ Version 7.24 - not yet released
- padding in fields
- rework menu labels
- increase popup message timeouts
- fix missing wind arrow InfoBox updates
* file handling
- guard against file corruption in poweroff situations
* FLARM
Expand Down
5 changes: 4 additions & 1 deletion src/InfoBoxes/Content/Weather.cpp
Expand Up @@ -188,12 +188,15 @@ void
InfoBoxContentWindArrow::Update(InfoBoxData &data) noexcept
{
const DerivedInfo &info = CommonInterface::Calculated();
const NMEAInfo &basic = CommonInterface::Basic();
if (!info.wind_available || info.wind.IsZero()) {
data.SetInvalid();
return;
}

data.SetCustom(info.wind_available.ToInteger());
data.SetCustom(info.wind_available.ToInteger() +
basic.attitude.heading_available.ToInteger() +
basic.track_available.ToInteger());

TCHAR speed_buffer[16];
FormatUserWindSpeed(info.wind.norm, speed_buffer, true, false);
Expand Down

0 comments on commit 1e493d9

Please sign in to comment.