f1-telemetry-client
f1-telemetry-client copied to clipboard
Inconsistent TyreStintHistoryData compounds from Session History Packet
Describe the bug
The m_tyreActualCompound
and m_tyreVisualCompound
from TyreStintHistoryData
from the Session History packet is sometimes incorrect. I'm not sure if this a bug from the typing of the client, or from the game.
To Reproduce
I was doing grand prix with medium session length. I always do soft (C4 / 18) -> medium (C3 / 19) stints. My issue is, using the m_tyreActualCompound
from the Session History packet and TYRES constant from the client, I sometimes got the wrong compound, sometimes I got soft (C5 / 17) -> soft (C4 / 18) instead of soft (C4 / 18) -> medium (C3 / 19).
My telemetry settings are:
Broadcast: Off
IP: 127.0.0.1
Port: 20777
Rate: 20Hz
Format: 2022
Your Telemetry: Restricted
Show Player Names: Off
Expected behavior I should get correct compound which is soft (C4 / 18) -> medium (C3 / 19).
Screenshots/Additional information
Here is a screenshot of the wrong stints history data from Session History packet:
Thanks for flagging this, it will need more investigation as the EA docs indicate that m_tyreActualCompound=17
would be a C4 and 18 would be a C3. The constants in tyres.ts
match to the documentation from EA https://github.com/racehub-io/f1-telemetry-client/blob/e256b7a4201e0802c7430d719f6fd82037d1f59a/src/constants/tyres.ts#L21. It could be an indexing base issue, if the constants were 1 based rather than 0 based this would explain the issue.