Counter for invalidate laps in a session
Posted: Mon Jul 31, 2023 3:13 am
I have a math channel 'Invalid lap' that calculates if track limits were exceeded and all I want to do is have a count of these invalidated laps for the session. In my head, this sounded like a simple operation, however I just can't find a way to increment a count by 1 when a condition is true.
The closest I got was:
integrate(derivative('Invalid lap'),'Invalid lap'==1)
where 'Invalid lap' is stat_max('One','Num Tires Off Track'==4,range_change("Outings:Laps"))
however this stopped counting when there were 2 consecutive invalid laps.
If I was writing code, I'd loop through the laps and increment a count by one, where 'invalid lap'==1 but I cannot for the life in me, find a way to do it in i2 pro, and my head is hurting!
The closest I got was:
integrate(derivative('Invalid lap'),'Invalid lap'==1)
where 'Invalid lap' is stat_max('One','Num Tires Off Track'==4,range_change("Outings:Laps"))
however this stopped counting when there were 2 consecutive invalid laps.
If I was writing code, I'd loop through the laps and increment a count by one, where 'invalid lap'==1 but I cannot for the life in me, find a way to do it in i2 pro, and my head is hurting!