예제 #1
0
static void
OnBallastData(DataField *Sender, DataField::DataAccessKind_t Mode)
{
  DataFieldFloat &df = *(DataFieldFloat *)Sender;

  switch (Mode) {
  case DataField::daSpecial:
    SetBallastTimer(glide_polar.HasBallast() &&
                    !XCSoarInterface::GetComputerSettings().ballast_timer_active);
    break;
  case DataField::daChange:
    glide_polar.SetBallastLitres(df.GetAsFixed());
    changed = true;
    SetButtons();
    SetBallast();
    break;
  }
}
예제 #2
0
void
FlightSetupPanel::FlipBallastTimer()
{
  const ComputerSettings &settings = CommonInterface::GetComputerSettings();
  SetBallastTimer(!settings.polar.ballast_timer_active);
}
예제 #3
0
static void
OnBallastDump(gcc_unused WndButton &Sender)
{
  SetBallastTimer(!XCSoarInterface::GetComputerSettings().ballast_timer_active);
}