Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Oct 2, 2024
2 parents ab2eb20 + d020759 commit 11f4480
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/loadpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,8 @@ func (lp *Loadpoint) syncCharger() error {
if isCg {
if current, err = cg.GetMaxCurrent(); err == nil {
// smallest adjustment most PWM-Controllers can do is: 100%÷256×0,6A = 0.234A
if math.Abs(lp.chargeCurrent-current) > 0.23 {
if shouldBeConsistent {
if delta := math.Abs(lp.chargeCurrent - current); delta > 0.23 {
if shouldBeConsistent && delta >= 1 {
lp.log.WARN.Printf("charger logic error: current mismatch (got %.3gA, expected %.3gA)", current, lp.chargeCurrent)
}
lp.chargeCurrent = current
Expand Down

0 comments on commit 11f4480

Please sign in to comment.