Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions vbms32_micro/vbms32_micro.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ loopwhile-thd
(setq init-done true)

(setq charge-ok (and
; charging should only start if the voltage is lower than vc_charge_start
(< c-max (bms-get-param 'vc_charge_start))
(< c-max (bms-get-param 'vc_charge_end))
(> c-min (bms-get-param 'vc_charge_min))
(< t-max (bms-get-param 't_charge_max))
Expand Down Expand Up @@ -644,6 +646,8 @@ loopwhile-thd
(bms-get-param 'vc_charge_end)
(bms-get-param 'vc_charge_start)
))
; Since vc_charge_start can be set higher than vc_charge_end in VESC tool, we need to always check for that
(< c-max (bms-get-param 'vc_charge_end))
(> c-min (bms-get-param 'vc_charge_min))
(< t-max (bms-get-param 't_charge_max))
(> t-min (bms-get-param 't_charge_min))
Expand Down