public void Process() { if (packet.GetType().Name == "TimingsDataDecoder") { TimingsDataDecoder timings = (TimingsDataDecoder)packet; if (timings.participants.ParticipantInfoArray(timings.localParticipantIndex.Int()).currentLap.Int() != lapNumber) { lapNumber = timings.participants.ParticipantInfoArray(timings.localParticipantIndex.Int()).currentLap.Int(); if (lap.Size() != 0) { laps.Add(lap); lap = new Lap(); } } } lap.Add(packet); }
public void Add(Lap lap) { laps.Add(lap); }
public TelemetryRecorder() { lapNumber = 99999999; laps = new Laps(); lap = new Lap(); }