-
Notifications
You must be signed in to change notification settings - Fork 92
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
prefer_typed changes the values of strings #256
Comments
In addition: not all enum fields are being handled consistently, eg with the JSON format, vehicle version 2024.44.25.4 ad52e3119f65: With
With
Notice that Is this going to change with future software releases? What is the recommended approach to handling enum values? |
When prefer_typed is true, the vehicle sends the data using enums, not strings. When converting to JSON, UseEnumNumbers is currently hardcoded to false. fleet-telemetry/telemetry/record.go Lines 26 to 29 in 5c18d47
I will work on better documenting this, but don't think server-side changes are ideal as:
|
@patrickdemers6 Thank you for your hard work. Can you please document the effect of these fields a little more formally? AFAIK, there is zero documentation for prefer_types while using minimum_data requires it. If I understand your comment above correctly, the format changes depending on values of both Migration becomes a headache when there are inconsistencies like the ones that are reported by @jbanyer and @Bre77 reported above. Please note that we have to deal with migrations on the client side as well and changes like this will force us to run two instances of the server while clients (eg, mobiles apps) are being updated gradually and vehicles get the new firmware updates. Also testing of these new features is not possible for those of us who do not have the newer firmware (2024.45.32 has been installed on a small fraction of cars). One option would be for developer to register a couple of VINs to get these updates sooner to be able to test. |
I'm happy with Patrick's response and it makes complete sense. Due to the consistent naming of the Enums, I'm handing it fairly easily in my client. |
Getting typed values from Fleet Telemetry with
prefer_typed
is great, but I wanted to check that it was meant to be changing the string values to different string values too.For example
Sentry Mode has changed:
Off is SentryModeStateOff
Idle is SentryModeStateIdle
Armed is SentryModeStateArmed
etc
These already had pretty good values
, but now the protobuf field names are being returned
The text was updated successfully, but these errors were encountered: