@@ -9,6 +9,8 @@ import { RelativeGapRuntime } from '../../../processors/relativeGapRuntime';
99import { SectorTimingRuntime } from '../../../processors/sectorTimingRuntime' ;
1010import { StandingsRuntime } from '../../../processors/standingsRuntime' ;
1111import { RadioRuntime } from '../../../processors/radioRuntime' ;
12+ import { SessionTimingRuntime } from '../../../processors/sessionTimingRuntime' ;
13+ import { LapTimesRuntime } from '../../../processors/lapTimesRuntime' ;
1214
1315export async function publishIRacingSDKEvents (
1416 overlayManager : OverlayManager ,
@@ -19,6 +21,10 @@ export async function publishIRacingSDKEvents(
1921 perfMetrics . startReporting ( ) ;
2022
2123 const bridge = generateMockData ( ) ;
24+ const lapTimesRuntime =
25+ channelBus && lifecycle
26+ ? new LapTimesRuntime ( channelBus , lifecycle , perfMetrics )
27+ : undefined ;
2228 const carSpeedsRuntime = channelBus
2329 ? new CarSpeedsRuntime ( channelBus , lifecycle , perfMetrics )
2430 : undefined ;
@@ -46,24 +52,36 @@ export async function publishIRacingSDKEvents(
4652 const radioRuntime = channelBus
4753 ? new RadioRuntime ( channelBus , lifecycle , perfMetrics )
4854 : undefined ;
55+ const sessionTimingRuntime =
56+ channelBus && lapTimesRuntime
57+ ? new SessionTimingRuntime (
58+ channelBus ,
59+ lifecycle ,
60+ perfMetrics ,
61+ lapTimesRuntime
62+ )
63+ : undefined ;
4964
5065 bridge . onSessionData ( ( session ) => {
5166 carSpeedsRuntime ?. onSession ( session ) ;
5267 referenceLapRuntime ?. onSession ( session ) ;
5368 relativeGapRuntime ?. onSession ( session ) ;
5469 sectorTimingRuntime ?. onSession ( session ) ;
5570 standingsRuntime ?. onSession ( session ) ;
71+ sessionTimingRuntime ?. onSession ( session ) ;
5672 overlayManager . publishMessage ( 'sessionData' , session ) ;
5773 } ) ;
5874
5975 bridge . onTelemetry ( ( telemetry ) => {
6076 perfMetrics . markStart ( 'processTelemetry' ) ;
77+ lapTimesRuntime ?. onFrame ( telemetry ) ;
6178 carSpeedsRuntime ?. onFrame ( telemetry ) ;
6279 referenceLapRuntime ?. onFrame ( telemetry ) ;
6380 relativeGapRuntime ?. onFrame ( telemetry ) ;
6481 sectorTimingRuntime ?. onFrame ( telemetry ) ;
6582 standingsRuntime ?. onFrame ( telemetry ) ;
6683 radioRuntime ?. onFrame ( telemetry ) ;
84+ sessionTimingRuntime ?. onFrame ( telemetry ) ;
6785 perfMetrics . markStart ( 'broadcast' ) ;
6886 overlayManager . publishMessage ( 'telemetry' , telemetry ) ;
6987 perfMetrics . markEnd ( 'broadcast' ) ;
@@ -80,10 +98,12 @@ export async function publishIRacingSDKEvents(
8098 ...bridge ,
8199 stop : ( ) => {
82100 carSpeedsRuntime ?. dispose ( ) ;
101+ lapTimesRuntime ?. dispose ( ) ;
83102 relativeGapRuntime ?. dispose ( ) ;
84103 sectorTimingRuntime ?. dispose ( ) ;
85104 standingsRuntime ?. dispose ( ) ;
86105 radioRuntime ?. dispose ( ) ;
106+ sessionTimingRuntime ?. dispose ( ) ;
87107 referenceLapRuntime ?. dispose ( ) ;
88108 perfMetrics . stopReporting ( ) ;
89109 originalStop ( ) ;
0 commit comments