Beispiel #1
0
void
FlightSetupPanel::OnTimer()
{
  const PolarSettings &settings = CommonInterface::GetComputerSettings().polar;

  if (settings.ballast_timer_active) {
    /* display the new values on the screen */
    SetBallast();
  }

  RefreshAltitudeControl();
}
Beispiel #2
0
void
FlightSetupPanel::SetQNH(AtmosphericPressure qnh)
{
  const NMEAInfo &basic = CommonInterface::Basic();
  ComputerSettings &settings_computer = CommonInterface::SetComputerSettings();

  settings_computer.pressure = qnh;
  settings_computer.pressure_available.Update(basic.clock);

  if (device_blackboard != NULL) {
    MessageOperationEnvironment env;
    device_blackboard->SetQNH(qnh, env);
  }

  RefreshAltitudeControl();
}
Beispiel #3
0
/**
 * This function is called repeatedly by the timer and updates the
 * current altitude and ballast. The ballast can change without user
 * input due to the dump function.
 */
static void
OnTimerNotify(gcc_unused WndForm &Sender)
{
  if (protected_task_manager != NULL &&
      XCSoarInterface::GetComputerSettings().ballast_timer_active && !changed) {
    /* get new GlidePolar values */
    glide_polar = CommonInterface::GetComputerSettings().glide_polar_task;

    /* display the new values on the screen */
    SetBallast();

    /* SetBallast() may have set the "changed" flag, reset it */
    changed = false;
  }

  RefreshAltitudeControl();
}
Beispiel #4
0
static void
OnQnhData(DataField *_Sender, DataField::DataAccessKind_t Mode)
{
  DataFieldFloat *Sender = (DataFieldFloat *)_Sender;
  const NMEAInfo &basic = CommonInterface::Basic();
  ComputerSettings &settings_computer =
    CommonInterface::SetComputerSettings();

  switch (Mode) {
  case DataField::daChange:
    settings_computer.pressure =
      AtmosphericPressure::HectoPascal(Units::ToSysPressure(Sender->GetAsFixed()))
;
    settings_computer.pressure_available.Update(basic.clock);
    device_blackboard->SetQNH(Units::ToSysPressure(Sender->GetAsFixed()));
    RefreshAltitudeControl();
    break;

  case DataField::daSpecial:
    return;
  }
}