MCPcopy Create free account
hub / github.com/evcc-io/evcc / roundedCurrent

Method roundedCurrent

core/loadpoint.go:918–924  ·  view source on GitHub ↗

roundedCurrent rounds current down to full amps if charger or vehicle require it

(current float64)

Source from the content-addressed store, hash-verified

916
917// roundedCurrent rounds current down to full amps if charger or vehicle require it
918func (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
927func (lp *Loadpoint) setLimit(current float64) error {

Callers 1

setLimitMethod · 0.95

Calls 1

coarseCurrentMethod · 0.95

Tested by

no test coverage detected