iRacing's new flagman logic causes flag trigger problems

Posts: 100
Hi guys,

Not sure if anyone else has noticed this, but with iRacing's "retraining" of the flagman, the yellow flag trigger happens as the field exits turn four while coming to a restart. It goes from the "one to green" trigger, back to "caution" right before getting the green.

I imagine iRacing changed how the logic works to prevent their issues with the flagman waiting too long to throw the green. This might be at tricky bug to fix, and test, but thought I'd mention it. It only happens at tracks where the flagman has received this "new training" (Charlotte, Texas, Kansas, etc).
Posts: 785
If you are talking about the event triggers, then I'm afraid the flag triggers come directly from the SDK and if there is a sudden caution flag in there then there is little we can do to "fix" that. Could it be a bug in the SDK? I can check.
Posts: 100
Nick Thissen wrote:
If you are talking about the event triggers, then I'm afraid the flag triggers come directly from the SDK and if there is a sudden caution flag in there then there is little we can do to "fix" that. Could it be a bug in the SDK? I can check.


Possibly, I'll send a note to the iRacing staff as well. Whatever fix they did to solve the flagman animation was probably some sketchy racecontrol wizardy that is screwing with the event trigger.

Definitely not a big problem, but worth solving if we can get to the bottom of it.
Posts: 100
The message below is from David Tucker - it looks like the "one to green" goes away with the new "flag held" trigger, exposing the yellow trigger again.


You may need to talk with ATVO to see about handling the new flag. It looks like we always held the yellow flag up even when one to green flew, they just had logic in there to hide the yellow. All that changed on our end is the extra green held flag going up.

It is possible that one to green is going down when green held goes up. In that case they just need to treat green held as if it was one to green and there logic will still work.
Posts: 785
We push new Flag events whenever iRacing changes their list of active flags.

If GreenHeld goes up while the Caution or Yellow flag is still active, then yes we may trigger another Caution or FlagYellow event indeed.

I need to see if this is desired behavior or not... probably not, but I'm not sure how to handle it better.


It sounds like maybe we should just completely ingore the GreenHeld flag? I will check with David myself. If this flag is only there to 'activate' the flagman animation earlier then we don't want to react to it.


This may help me debug: when this second caution event happens, do we also count an additional caution? So the amount of cautions we count in the sessionstate binding is off by a factor 2?
Edited (1 time)
Posts: 100
Nick Thissen wrote:
We push new Flag events whenever iRacing changes their list of active flags.

If GreenHeld goes up while the Caution or Yellow flag is still active, then yes we may trigger another Caution or FlagYellow event indeed.

I need to see if this is desired behavior or not... probably not, but I'm not sure how to handle it better.


It sounds like maybe we should just completely ingore the GreenHeld flag? I will check with David myself. If this flag is only there to 'activate' the flagman animation earlier then we don't want to react to it.


This may help me debug: when this second caution event happens, do we also count an additional caution? So the amount of cautions we count in the sessionstate binding is off by a factor 2?

I can't test the caution count until tonight - but I think we just want to ignore flag held - it's only there for the flagman to "be ready" for the green. I'm not sure it's really useful for theme integration, although I can only speak for myself.
Posts: 785
I've released a beta version where I ignore the GreenHeld flag entirely. If you can try that and let me know if that fixes the issue then at least I know this is a viable solution. Unless it turns out someone needs the GreenHeld flag but I doubt it.
Posts: 100
Nick Thissen wrote:
I've released a beta version where I ignore the GreenHeld flag entirely. If you can try that and let me know if that fixes the issue then at least I know this is a viable solution. Unless it turns out someone needs the GreenHeld flag but I doubt it.

Yep, this fix worked like a charm. Back to normal behavior! You've been on top of it lately, much appreciated!