Conversation
Initial idea, will probably need review/changes
Attempting to move code around to make it easier to follow. Made new functions just for setup() to call. Unnecessary, but easier to view setup() and see the overview of the functionality. More comments throughout. Hopefully anyone can follow.
| bool tempConvFlag = false; | ||
| bool tempReceiveFlag = false; | ||
| uint16_t CT_value = 0; | ||
| int error; |
Author
There was a problem hiding this comment.
better name, errorReturn from ltc or something
code cleanups. pindefs to header, LTC consts and voltages to other header. function prototypes. optimized VoltageFix & Balance_Check. removed OLD_BAL as we can just roll back if need to. better variable & constant names. moved back to "no discharge" voltage checks as it was causing instability in discharging due to voltage sag. ESR and current voltage measurement now inside ifdef, if to use need to get better ESR measurement.
Little test board
Linear forgot an increment in the functions which read and parse the temperature and cell voltage values. From vendor, when using multiple stacked 6803's, this would cause the controller to read the PEC byte as a cell voltage or temperature value for the above 6803. This fixes that and increases that counter. This increase realigns the single dimensional array read in from SPI with the two dimensional array used in the general code.
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.
mostly for code review.