Truncate charge current to full amps
This commit is contained in:
parent
e6f4ba0229
commit
51824bb8a0
1 changed files with 1 additions and 0 deletions
|
|
@ -491,6 +491,7 @@ func (lp *LoadPoint) setLimit(chargeCurrent float64, force bool) (err error) {
|
|||
lp.log.DEBUG.Printf("max charge current: %.2g", chargeCurrent)
|
||||
err = charger.MaxCurrentMillis(chargeCurrent)
|
||||
} else {
|
||||
chargeCurrent = math.Trunc(chargeCurrent)
|
||||
lp.log.DEBUG.Printf("max charge current: %d", int64(chargeCurrent))
|
||||
err = lp.charger.MaxCurrent(int64(chargeCurrent))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue