You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a car doesn't have ERS or DRS the values in the TelemetryInfo aren't getting set and this is causing the following exception: "No telemetry value with the specified name exists."
Through further testing I've found that this works perfectly fine when using the modern F1 car but seems to break on all other vehicles.
The text was updated successfully, but these errors were encountered:
Just to clarify - you are talking only about the TelemetryInfo.GetValues method, right? I can see how that would break indeed. I am just wondering if there is a real use case for that method, I have never needed it myself so I was already considering removing it.
Fixing this issue is a little tricky because it will change the way initializing TelemetryValue instances work. I will take a look at it.
Did a quick test as well to verify whether the exception is thrown just in case the GetValues method is beeing called. Tested this quckly with one of the vehicle dependent teletry information "EnergyBatteryToMGU". Does not make a difference whether I use TelemetryInfo.EnergyBatteryToMGU or TelemetryInfo.GetValues() - both do result in an exception thrown in mscorlib.dll (Exception thrown: 'System.ArgumentNullException' in mscorlib.dll).
Due to being interested to use a wrapper instead of dealing with API myself I'll spend some time to suggest a fix.
@NickThissen: Would you mind adding me as a collaborator?
When a car doesn't have ERS or DRS the values in the TelemetryInfo aren't getting set and this is causing the following exception: "No telemetry value with the specified name exists."
Through further testing I've found that this works perfectly fine when using the modern F1 car but seems to break on all other vehicles.
The text was updated successfully, but these errors were encountered: