void InfoBoxContentOLCSpeed::Update(InfoBoxData &data) { const ComputerSettings &settings_computer = CommonInterface::GetComputerSettings(); if (!settings_computer.contest.enable || !protected_task_manager) { data.SetInvalid(); return; } int result_index = (settings_computer.contest.contest == Contest::OLC_LEAGUE) ? 0 : -1; const ContestResult& result_olc = CommonInterface::Calculated().contest_stats.GetResult(result_index); if (result_olc.score < fixed(1)) { data.SetInvalid(); return; } // Set Value data.SetValueFromSpeed(result_olc.GetSpeed()); data.UnsafeFormatComment(_T("%.1f pts"), (double)result_olc.score); }
void InfoBoxContentSpeed::Update(InfoBoxData &data) { const NMEAInfo &basic = CommonInterface::Basic(); if (!basic.airspeed_available) { data.SetInvalid(); return; } data.SetValueFromSpeed(basic.true_airspeed, false); }
void InfoBoxContentSpeedGround::Update(InfoBoxData &data) { const NMEAInfo &basic = CommonInterface::Basic(); if (!basic.ground_speed_available) { data.SetInvalid(); return; } data.SetValueFromSpeed(basic.ground_speed); }
void UpdateInfoBoxSpeedIndicated(InfoBoxData &data) { const NMEAInfo &basic = CommonInterface::Basic(); if (!basic.airspeed_available) { data.SetInvalid(); return; } data.SetValueFromSpeed(basic.indicated_airspeed, false); }
void InfoBoxContentSpeedDolphin::Update(InfoBoxData &data) { // Set Value const DerivedInfo &calculated = CommonInterface::Calculated(); data.SetValueFromSpeed(calculated.V_stf, false); // Set Comment if (XCSoarInterface::GetComputerSettings().features.block_stf_enabled) data.SetComment(_("BLOCK")); else data.SetComment(_("DOLPHIN")); }
void InfoBoxContentSpeedMacCready::Update(InfoBoxData &data) { const CommonStats &common_stats = CommonInterface::Calculated().common_stats; data.SetValueFromSpeed(common_stats.V_block, false); }