Repository navigation
Refuse lossy writes and handle faulty charger data - #48
Merged
Merged
Conversation
The lock option "never locked" (3) went out as true, a trip energy with a fraction lost it.
bac is a number since firmware 38.5, so the definition declares no type for it; the trip energy is rounded before it is sent.
Texts too long for a state, short reading lists, a true for a number, presets out of range, frames that fail, and secrets in unknown fields.
A frame that fails is skipped like an unreadable one, and the diagnostics download decides every field declared without a type.
An unknown charger model, a true for a numbered option, a value nested too deep, a list too long for a state, and empty values in redaction.
Presets need a known model instead of failing every select, a bool matches no numbered label, and any value too long for a state is unknown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes from a review of the integration's handling of charger data.
true, the same as "Locked when car is connected", and a next-trip energy with a fraction was cut off. A conversion that would change the value is now refused;bacdeclares no type (a bool before firmware 38.5, a number since), and the trip energy is rounded.truewhere a number belongs shows as unknown; current presets stay within the model's range (and none for an unknown model); a frame that cannot be read is skipped and the connection stays up.wss, the load balancing members and the last ID chip read are redacted; every field the definition declares without a type now has a redaction decision.