Coda min voltage, current precision, formatting #4
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.
The existing coded will work as long as the voltage is above 200. At 200 there is a scaling error. However there will be some precision issues with the current control.
Example - 15A should be 1500 lets say, which would be 0x05DC. What will go on the bus is 0x0505 as the lower byte is not being used.
This PR adds a few comments, fixes the issues above, and fixes the spacing to be in line.
It was unclear to be (but seems likely) that the
if (mescycl == 2)
line is probably part of the Chevy Volt case. So right now that's being sent in all scenarios I think. But that is not addressed in this PR.Thanks again for the great product, I hope this PR makes this fix even easier for you. :-)
-Matt