void InfoBoxContentAltitude::PnlSetupOnQNH(DataField *_Sender, DataField::DataAccessKind_t Mode) { DataFieldFloat *Sender = (DataFieldFloat *)_Sender; SETTINGS_COMPUTER &settings_computer = CommonInterface::SetSettingsComputer(); switch (Mode) { case DataField::daChange: settings_computer.pressure.SetQNH(Sender->GetAsFixed()); settings_computer.pressure_available.Update(CommonInterface::Basic().clock); device_blackboard.SetQNH(Sender->GetAsFixed()); break; case DataField::daSpecial: return; } }
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; } }
static void OnBugsData(DataField *_Sender, DataField::DataAccessKind_t Mode) { DataFieldFloat *Sender = (DataFieldFloat *)_Sender; switch (Mode) { case DataField::daChange: glide_polar.SetBugs(fixed_one - (Sender->GetAsFixed() / 100)); changed = true; break; case DataField::daSpecial: return; } }