Bender: fix soc range if NaN (#14972)
This commit is contained in:
parent
cbb1319ebc
commit
d6f6685c56
1 changed files with 3 additions and 1 deletions
|
|
@ -315,7 +315,9 @@ func (wb *BenderCC) soc() (float64, error) {
|
|||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return float64(binary.BigEndian.Uint16(b)), nil
|
||||
if soc := binary.BigEndian.Uint16(b); soc <= 100 {
|
||||
return float64(soc), nil
|
||||
}
|
||||
}
|
||||
|
||||
return 0, api.ErrNotAvailable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue