Esempio n. 1
0
        public void StateLocationUpdate(Location location, Action legCompletedAction = null)
        {
            if (Current == null)
                Current = new Leg(Car, DrivePath);
            else if (Current.Completed)
            {
                if (legCompletedAction != null)
                    legCompletedAction.Invoke();

                var legPath = Current.Save();
                Legs.Add(Current);
                Current.Dispose();
                Current = new Leg(Car, DrivePath);
                service.Run(ObdPid.PendingTroubleCodes);
            }

            Current.UpdateLocation(location);
        }
Esempio n. 2
0
 public void UpdateLocation(Location location)
 {
     var locReading = new Reading<Location>(location);
     distanceReadings.Add(locReading);
 }