Add support for Hyundai api (#329)

This commit is contained in:
andig 2020-09-13 16:06:33 +02:00 • committed by GitHub
parent 7f0225dc23
commit a24caac73d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 482 additions and 362 deletions

View file

@ -82,7 +82,7 @@ func (s *SocEstimator) SoC(chargedEnergy float64) (float64, error) {
s.prevChargedEnergy = math.Max(chargedEnergy, 0)
s.prevSoC = s.socCharge
} else {
s.socCharge = math.Min(f + energyDelta / s.energyPerSocStep, 100)
s.socCharge = math.Min(f+energyDelta/s.energyPerSocStep, 100)
s.log.TRACE.Printf("soc estimated: %.2f%% (vehicle: %.2f%%)", s.socCharge, f)
}
}