@FG44141 wrote:
@Hoobiechoobie Thanks for the reply.
Any idea on how I can get this working again to only show track limit warnings. I've tried to get infringement type etc working but I just cut seem to do it. Im using SimHub.
I cannot figure out how to make a line of code to use for F1 22 to only flag track limit warnings, even using the F1 22 UDP guide i'm still unsure
We can't really comment on specific code. However, each warning or penalty should generate the following event:
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;
Depending on what you are trying to do, you should be able to read in the penalty events ("PENA") and discard any events that you aren't interested in. The appendix contains info for the different penalty types (warning, time penatly, etc.) as well as the infringement type. There are a lot of different infringement types, including 6 specifically for corner cutting, plus some others about unfair ways of gaining a time advantage, so it's worth checking through the list to see which ones you care about.