chore: simplify filling values
Some checks failed
Some checks failed
This commit is contained in:
parent
85e2d70d18
commit
2ebd09ed95
1 changed files with 3 additions and 5 deletions
|
|
@ -453,11 +453,9 @@ func (c *EEBus) currents() (float64, float64, float64, error) {
|
|||
return 0, 0, 0, err
|
||||
}
|
||||
|
||||
count := len(currents)
|
||||
if count < 3 {
|
||||
for fill := 0; fill < 3-count; fill++ {
|
||||
currents = append(currents, 0)
|
||||
}
|
||||
// fill phases
|
||||
for i := len(currents); i < 3; i++ {
|
||||
currents = append(currents, 0)
|
||||
}
|
||||
|
||||
return currents[0], currents[1], currents[2], nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue