Battery control: use max of soc and minsoc
This commit is contained in:
parent
bc0f87ba47
commit
6f55ddf56d
1 changed files with 1 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ func (m *battery) BatteryController(socG func() (float64, error), limitSocS func
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return limitSocS(soc)
|
||||
return limitSocS(max(soc, m.MinSoc))
|
||||
|
||||
case api.BatteryCharge:
|
||||
return limitSocS(m.MaxSoc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue