Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TireCompound API #237

Closed
jfgilliam opened this issue Oct 13, 2020 · 16 comments
Closed

TireCompound API #237

jfgilliam opened this issue Oct 13, 2020 · 16 comments
Assignees
Milestone

Comments

@jfgilliam
Copy link
Contributor

iRacing now outputs your tire compound in the telemetry. Add to the API and possible some of the widgets. Also make it a text widget.

@linus Areng suggested this.

My thoughts and notes:

It probably should be part of the Gauge design. Tire attribute for sure. What other gauges would need a similar attribute? What would a good generic name be? So, if a gauge is changeable, like tires, you get to choose it as well.

Should act like a tire measurement, similar to the temps and pressures?

iRacing puts out these arrays in the vars that returns an enumerated number:

CarIdxTireCompound
CarIdxQualTireCompound
CarIdxQualTireCompoundLocked

Haven't found the enum in the SDK, but here's my guess.
0 = SOFT
1 = MEDIUM
2 = HARD

Need to learn more about how they are used/controlled in a Race. Maybe the ability to choose prior to pitting in the PitController widget.

@linusareng
Copy link

Hey, cheers for looking at adding it.
They way I'd personally looking to use this info is in a standings and/or relative widget where the information about what tyre compound the cars around me have which will influate both my driving at the moment as well as race strategy.

Other people might look to use it differently, but that's my usecase.

@jfgilliam
Copy link
Contributor Author

Tell me more about how you choose. I've never run a race where this was an option. Is it something you have to choose before the race and/or qualifying? Or can you choose each time you pit to put on a different compound? Can you choose in a practice session? Are your choices different based on the track? Is the a count limit of each type?

@linusareng
Copy link

linusareng commented Oct 14, 2020

How it works is that you have to start with the tire you qualify with. This is enforced and that's why you see the CarIdxQualTireCompoundLocked var.
So you choose a qualifying tire in the garage settings, and after you've set a time on that tire it is locked in as your race start tire.

Then while racing, you choose in a black box which tire you'd like to switch to when pitting. Soft, medium or hard.
Soft are the quickest tire, but don't last long in the race.

In the races there are a variety of strategies playing out, and some people are easier on their tires making them last longer which can be a great advantage.

To amend on it:
You can pit as often as you wish and there are no tire limits in place as far as I know.
In practice you choose in garage settings or while pitting. You may choose whichever compound you like.
Choices are the same, ie soft, medium or hard.

@jfgilliam
Copy link
Contributor Author

Ok, that helps a lot. iRacing has an API where I can send messages to them on what to do on your next pit. I saw someone asked in the forums to have the API amended with the ability to choose the tire compound as well. So, apparently it can only be chosen in their black box at the moment. Nothing new for them. They don't give much attention to this API and it generally lags in features. Some are still not there for many years in the API, such as, Wedge adjustments.

So that it doesn't take much room on the widgets, would simply displaying S,M,or H be sufficient?

@jfgilliam
Copy link
Contributor Author

image

@jfgilliam
Copy link
Contributor Author

I wonder if iRacing will use this when they get around to rain tires? I'm going to post a question on the forums.

@linusareng
Copy link

For myself personally S, M and H would be sufficient or even preferred, F1 people will know and don't need the full name.
And as a color blind person I can have a hard time seeing what tires are in use at the moment if images or solely colors are used. iRacing themselves use small tire images to show which tire a person is on (visible in "Entries" tab in sim). This is hard to discern for me.

I think they'll definitely use this for other compounds, such as rain tires, going forward.
Tires are red, yellow or white (soft, medium, hard).

@jfgilliam
Copy link
Contributor Author

image

@jfgilliam
Copy link
Contributor Author

image

@jfgilliam
Copy link
Contributor Author

image

@jfgilliam
Copy link
Contributor Author

Can you provide a list of all the cars that have this option that you know of?

@jfgilliam jfgilliam self-assigned this Oct 15, 2020
@jfgilliam jfgilliam added this to the Version 1.15 milestone Oct 15, 2020
@jfgilliam
Copy link
Contributor Author

I also just observed that the PitSv variables to not indicate the Tire Compound selection for your next pit stop. So, until they add that, I can only display what's on the car after you pit.

image

@linusareng
Copy link

Only the McLaren MP4-30 so far has the tire compounds.

@linusareng
Copy link

How quickly do you usually add these kind of things out of curiosity?
Not to rush you at all, I just want something to look forward to and have a rough sketch if it is within next week, before new years or sometime later. A beta branch/release would be fine, added everything else I want on my widget just the tires missing :)

@jfgilliam
Copy link
Contributor Author

jfgilliam commented Oct 17, 2020 via email

@jfgilliam
Copy link
Contributor Author

new API is

/Car/(CARIDENTIFIER)/Gauge/TireCompound

Had to make ValueNext return ValueCurrent as iRacing is not logging in the telemetry what you have selected in the black box.

Updated the Tire and TireMeasurements widgets to display it.

This will be released in the 1.15 first BETA soon.

jfgilliam added a commit to SIMRacingApps/SIMRacingAppsWebContent that referenced this issue Dec 2, 2020
(SIMRacingApps/SIMRacingApps#237)
       TireCompound API
       - /Car/(CARIDENTIFIER)/Gauge/TireCompound
jfgilliam added a commit to SIMRacingApps/SIMRacingAppsServer that referenced this issue Dec 2, 2020
(SIMRacingApps/SIMRacingApps#237)
       TireCompound API
       - /Car/(CARIDENTIFIER)/Gauge/TireCompound
jfgilliam added a commit to SIMRacingApps/SIMRacingAppsSIMPluginiRacing that referenced this issue Dec 2, 2020
(SIMRacingApps/SIMRacingApps#237)
       TireCompound API
       - /Car/(CARIDENTIFIER)/Gauge/TireCompound
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants