Can someone advise how to make a track limit counter for F1 22, it used to show in the '.m_warnings' of the ump data but has been changed to include ALL warnings. There is a way to extract track specific warnings from the UDP but its really complicated for me to understand. I have included the F1 22 ump book and the code they pointed me to, but I cant figure it out.
Essentially i'm trying to only count track limit warnings, as after 3 you get a penalty, so i'm just trying to generate a simple number counting those limit warnings
somewhere in this region but I cant' integrate or figure out how to read in simhub and get it generate a single number for track limit infringement
struct
{
uint8 penaltyType; // Penalty type – see Appendices
uint8 infringementType; // Infringement type – see Appendices
uint8 vehicleIdx; // Vehicle index of the car the penalty is applied to
uint8 otherVehicleIdx; // Vehicle index of the other car involved
uint8 time; // Time gained, or time spent doing action in seconds
uint8 lapNum; // Lap the penalty occurred on
uint8 placesGained; // Number of places gained by this
} Penalty;