Feature: Add Support for BMS Tiltback 2.0 #37
+409
−10
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.
Rewritten to use variables in Refloat configuration for all parameters as an alternative to #27 . Made lisp portion much smaller and am just going to do processing in C (need to anyways to access float_conf). Since it's so small I felt that moving it to it's own bms.lisp was unnecessary and am just spinning up a thread in package.lisp. Lisp takes up eeprom space and is not compiler optimized like C.
There are no hard coded parameters now. All comments were addressed from other PR with this rewrite. All features tested and confirmed working.
Requires 6.06+ firmware. After thinking about it a lot I don't want to have to support 6.05 forever. It really adds a lot of lisp code as you have to parse all individual cell voltages and not just space but function call overhead as well. 6.06 has easy methods that I merged upstream:
It will also attempt to get the actual minimum cell temperature (as opposed to just using the max cell temperature as a fall back) as well as the bms mosfet temperature. This relies on the BMS being updated to the new protocol which can be checked with (get-bms-val 'bms-data-version). If you want to learn more please refer to LispBM manual.
Everything will provide tiltback except the cell balance. It will start beeping 1 second after disengage (giving it time to settle) before alerting if criteria is met.