Delta: fix status mapping

This commit is contained in:
premultiply 2024-07-29 20:10:07 +02:00
parent c4b5f871ff
commit efbb87b66b

View file

@ -151,9 +151,9 @@ func (wb *Delta) Status() (api.ChargeStatus, error) {
// 8: Not ready
// 9: Faulted
switch s := encoding.Uint16(b); s {
case 0, 1:
case 0, 1, 2, 3:
return api.StatusA, nil
case 2, 3, 5, 6, 7:
case 5, 6, 7:
return api.StatusB, nil
case 4:
return api.StatusC, nil