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

TelemetryInfo.GetValues() breaks when car doesn't have Energy Recovery system #4

Open
bdr27 opened this issue Jul 9, 2016 · 3 comments

Comments

@bdr27
Copy link

bdr27 commented Jul 9, 2016

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.

@NickThissen
Copy link
Owner

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.

@bdr27
Copy link
Author

bdr27 commented Jul 12, 2016

Yes it is just in TelemetryInfo.GetValues().

@MerlinCooper
Copy link

MerlinCooper commented Aug 28, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants