void Update(NMEA_INFO *Basic, DERIVED_INFO *Calculated) {
    if (!Calculated->Flying) 
      return;

    bool restart = false;
    if (Ready_Time_Check(Basic->Time, &restart)) {
      LastTime_Check = Basic->Time;
      if (CheckCondition(Basic, Calculated)) {
	if (Ready_Time_Notification(Basic->Time) && !restart) {
	  LastTime_Notification = Basic->Time;
	  Notify();
	  SaveLast();
	}
      }
      if (restart) {
        SaveLast();
      }
    }
  }
void
ConditionMonitor::Update(const GlideComputer& cmp)
{
  if (!cmp.Calculated().flight.flying)
    return;

  bool restart = false;
  const fixed Time = cmp.Basic().time;
  if (Ready_Time_Check(Time, &restart)) {
    LastTime_Check = Time;
    if (CheckCondition(cmp)) {
      if (Ready_Time_Notification(Time) && !restart) {
        LastTime_Notification = Time;
        Notify();
        SaveLast();
      }
    }

    if (restart)
      SaveLast();
  }
}
Exemple #3
0
void
ConditionMonitor::Update(const NMEAInfo &basic, const DerivedInfo &calculated,
                         const ComputerSettings &settings)
{
  if (!calculated.flight.flying)
    return;

  bool restart = false;
  const fixed Time = basic.time;
  if (Ready_Time_Check(Time, &restart)) {
    LastTime_Check = Time;
    if (CheckCondition(basic, calculated, settings)) {
      if (Ready_Time_Notification(Time) && !restart) {
        LastTime_Notification = Time;
        Notify();
        SaveLast();
      }
    }

    if (restart)
      SaveLast();
  }
}