Пример #1
0
void
InfoBoxContentThermal30s::Update(InfoBoxWindow &infobox)
{
  SetVSpeed(infobox, XCSoarInterface::Calculated().average);

  // Set Color (red/black)
  infobox.SetColor(XCSoarInterface::Calculated().average * fixed_two <
      XCSoarInterface::Calculated().common_stats.current_risk_mc ? 1 : 0);
}
Пример #2
0
void
UpdateInfoBoxThermal30s(InfoBoxData &data)
{
  SetVSpeed(data, CommonInterface::Calculated().average);

  // Set Color (red/black)
  data.SetValueColor(Double(CommonInterface::Calculated().average) <
      CommonInterface::Calculated().common_stats.current_risk_mc ? 1 : 0);
}
Пример #3
0
void
InfoBoxContentThermalAllAvg::Update(InfoBoxWindow &infobox)
{
  if (!positive(XCSoarInterface::Calculated().time_climb)) {
    infobox.SetInvalid();
    return;
  }

  SetVSpeed(infobox, XCSoarInterface::Calculated().total_height_gain /
            XCSoarInterface::Calculated().time_climb);
}
Пример #4
0
void
InfoBoxContentThermalLastAvg::Update(InfoBoxWindow &infobox)
{
  const OneClimbInfo &thermal = CommonInterface::Calculated().last_thermal;
  if (!thermal.IsDefined()) {
    infobox.SetInvalid();
    return;
  }

  SetVSpeed(infobox, thermal.lift_rate);
}
Пример #5
0
void
InfoBoxContentThermalAllAvg::Update(InfoBoxData &data)
{
  if (!positive(XCSoarInterface::Calculated().time_climb)) {
    data.SetInvalid();
    return;
  }

  SetVSpeed(data, XCSoarInterface::Calculated().total_height_gain /
            XCSoarInterface::Calculated().time_climb);
}
Пример #6
0
void
UpdateInfoBoxThermalLastAvg(InfoBoxData &data)
{
  const OneClimbInfo &thermal = CommonInterface::Calculated().last_thermal;
  if (!thermal.IsDefined()) {
    data.SetInvalid();
    return;
  }

  SetVSpeed(data, thermal.lift_rate);
}
Пример #7
0
void
UpdateInfoBoxThermalAllAvg(InfoBoxData &data)
{
  if (!positive(CommonInterface::Calculated().time_climb)) {
    data.SetInvalid();
    return;
  }

  SetVSpeed(data, CommonInterface::Calculated().total_height_gain /
            CommonInterface::Calculated().time_climb);
}
Пример #8
0
void
UpdateInfoBoxNextLegEqThermal(InfoBoxData &data)
{
  const fixed next_leg_eq_thermal = CommonInterface::Calculated().next_leg_eq_thermal;
  if (negative(next_leg_eq_thermal)) {
    data.SetInvalid();
    return;
  }

  SetVSpeed(data, next_leg_eq_thermal);
}
Пример #9
0
void
InfoBoxContentMacCready::Update(InfoBoxData &data)
{
  const ComputerSettings &settings_computer =
    CommonInterface::GetComputerSettings();

  data.SetTitle(settings_computer.task.auto_mc ? _("MC AUTO") : _("MC MANUAL"));

  SetVSpeed(data, settings_computer.polar.glide_polar_task.GetMC());

  const CommonStats &common_stats = CommonInterface::Calculated().common_stats;
  data.SetCommentFromSpeed(common_stats.V_block, false);
}
Пример #10
0
void
InfoBoxContentMacCready::Update(InfoBoxWindow &infobox)
{
  const SETTINGS_COMPUTER &settings_computer =
    CommonInterface::SettingsComputer();

  SetVSpeed(infobox, settings_computer.glide_polar_task.GetMC());

  // Set Comment
  if (XCSoarInterface::SettingsComputer().auto_mc)
    infobox.SetComment(_("AUTO"));
  else
    infobox.SetComment(_("MANUAL"));
}
Пример #11
0
void
UpdateInfoBoxVarioDistance(InfoBoxData &data)
{
  if (!CommonInterface::Calculated().task_stats.task_valid) {
    data.SetInvalid();
    return;
  }

  SetVSpeed(data,
            CommonInterface::Calculated().task_stats.total.vario.get_value());

  // Set Color (red/black)
  data.SetValueColor(negative(
      CommonInterface::Calculated().task_stats.total.vario.get_value()) ? 1 : 0);
}
Пример #12
0
void
UpdateInfoBoxThermalAvg(InfoBoxData &data)
{
  const OneClimbInfo &thermal = CommonInterface::Calculated().current_thermal;
  if (!thermal.IsDefined()) {
    data.SetInvalid();
    return;
  }

  SetVSpeed(data, thermal.lift_rate);

  // Set Color (red/black)
  data.SetValueColor(thermal.lift_rate * fixed(1.5) <
      CommonInterface::Calculated().common_stats.current_risk_mc ? 1 : 0);
}
Пример #13
0
void
InfoBoxContentVarioDistance::Update(InfoBoxData &data)
{
  if (!XCSoarInterface::Calculated().task_stats.task_valid) {
    data.SetInvalid();
    return;
  }

  SetVSpeed(data,
            XCSoarInterface::Calculated().task_stats.total.vario.get_value());

  // Set Color (red/black)
  data.SetValueColor(negative(
      XCSoarInterface::Calculated().task_stats.total.vario.get_value()) ? 1 : 0);
}
Пример #14
0
void
InfoBoxContentVarioDistance::Update(InfoBoxWindow &infobox)
{
  if (!XCSoarInterface::Calculated().task_stats.task_valid) {
    infobox.SetInvalid();
    return;
  }

  SetVSpeed(infobox,
            XCSoarInterface::Calculated().task_stats.total.vario.get_value());

  // Set Color (red/black)
  infobox.SetColor(negative(
      XCSoarInterface::Calculated().task_stats.total.vario.get_value()) ? 1 : 0);
}
Пример #15
0
void
InfoBoxContentThermalAvg::Update(InfoBoxWindow &infobox)
{
  const OneClimbInfo &thermal = CommonInterface::Calculated().current_thermal;
  if (!thermal.IsDefined()) {
    infobox.SetInvalid();
    return;
  }

  SetVSpeed(infobox, thermal.lift_rate);

  // Set Color (red/black)
  infobox.SetColor(thermal.lift_rate * fixed(1.5) <
      XCSoarInterface::Calculated().common_stats.current_risk_mc ? 1 : 0);
}
Пример #16
0
void
InfoBoxContentVarioNetto::Update(InfoBoxData &data)
{
  SetVSpeed(data, CommonInterface::Basic().netto_vario);
}
Пример #17
0
void
UpdateInfoBoxVarioNetto(InfoBoxData &data)
{
  SetVSpeed(data, CommonInterface::Basic().netto_vario);
}
Пример #18
0
void
InfoBoxContentVarioNetto::Update(InfoBoxWindow &infobox)
{
  SetVSpeed(infobox, CommonInterface::Basic().netto_vario);
}