static List <DataSample> GetIncidentsForward(IEnumerable <DataSample> samples, int maxTotalIncidents) { return(IncidentsSupport.FindIncidents( samples.TakeWhile(data => data.Telemetry.SessionState != SessionState.CoolDown), d => iRacing.Replay.MoveToNextIncident(), maxTotalIncidents)); }
static List <DataSample> GetIncidentsReverse(IEnumerable <DataSample> samples, int sessionNumber, int maxTotalIncidents) { return(IncidentsSupport.FindIncidents( samples.TakeWhile(data => data.Telemetry.SessionNum == sessionNumber && data.Telemetry.RaceLaps > 0), d => iRacing.Replay.MoveToPrevIncident(), maxTotalIncidents)); }
static List <DataSample> GetIncidentsForward(IEnumerable <DataSample> samples, int sampleScanSettle, int maxTotalIncidents) { TraceDebug.WriteLine("Scanning for incidents forwards from start"); return(IncidentsSupport.FindIncidents( samples.TakeWhile(data => data.Telemetry.SessionState != SessionState.CoolDown), sampleScanSettle, maxTotalIncidents)); }