EEbus: only adjust currents if not overridden by vehicle (#7563)

This commit is contained in:
Andreas Linde 2023-04-20 18:12:49 +02:00 • committed by GitHub
parent c126dac1aa
commit b4e62a97cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -170,10 +170,10 @@ func (c *EEBus) setLoadpointMinMaxLimits() {
newMin := minLimits[0]
newMax := maxLimits[0]
if c.lp.GetMinCurrent() != newMin && newMin > 0 {
if c.lp.GetMinCurrent() != newMin && newMin > 0 && c.lp.GetVehicle().OnIdentified().MinCurrent == nil {
c.lp.SetMinCurrent(newMin)
}
if c.lp.GetMaxCurrent() != newMax && newMax > 0 {
if c.lp.GetMaxCurrent() != newMax && newMax > 0 && c.lp.GetVehicle().OnIdentified().MaxCurrent == nil {
c.lp.SetMaxCurrent(newMax)
}
}