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; } }
void FlightSetupPanel::FlipBallastTimer() { const ComputerSettings &settings = CommonInterface::GetComputerSettings(); SetBallastTimer(!settings.polar.ballast_timer_active); }
static void OnBallastDump(gcc_unused WndButton &Sender) { SetBallastTimer(!XCSoarInterface::GetComputerSettings().ballast_timer_active); }