chore: minor
This commit is contained in:
parent
9de1ec2aba
commit
507d793dde
1 changed files with 1 additions and 1 deletions
|
|
@ -340,7 +340,7 @@ func (c *Circuit) ValidateCurrent(old, new float64) float64 {
|
|||
if maxCurrent := c.GetMaxCurrent(); maxCurrent != 0 {
|
||||
delta := max(0, new-old)
|
||||
potential := maxCurrent - c.current
|
||||
|
||||
|
||||
if delta > potential {
|
||||
capped := max(0, old+potential)
|
||||
c.log.DEBUG.Printf("validate current: %.3gA + (%.3gA -> %.3gA) > %.3gA capped at %.3gA", c.current, old, new, maxCurrent, capped)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue