roundedCurrent rounds current down to full amps if charger or vehicle require it
(current float64)
| 916 | |
| 917 | // roundedCurrent rounds current down to full amps if charger or vehicle require it |
| 918 | func (lp *Loadpoint) roundedCurrent(current float64) float64 { |
| 919 | // full amps only? |
| 920 | if lp.coarseCurrent() { |
| 921 | current = math.Trunc(current) |
| 922 | } |
| 923 | return current |
| 924 | } |
| 925 | |
| 926 | // setLimit applies charger current limits and enables/disables accordingly |
| 927 | func (lp *Loadpoint) setLimit(current float64) error { |