From 7e87ca6b9124489a90ca4fc757e350c0da831749 Mon Sep 17 00:00:00 2001 From: andig Date: Mon, 27 Nov 2023 12:33:32 +0500 Subject: [PATCH] Vestel: more aggressive watchdog --- charger/vestel.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charger/vestel.go b/charger/vestel.go index 7fa0ac7a0..210b7d5d1 100644 --- a/charger/vestel.go +++ b/charger/vestel.go @@ -101,12 +101,12 @@ func NewVestel(uri string, id uint8) (*Vestel, error) { if err != nil { return nil, fmt.Errorf("failsafe timeout: %w", err) } - timeout := 10 * time.Second + timeout := 5 * time.Second // 20s/4 if u := binary.BigEndian.Uint16(b); u > 0 { timeout = time.Duration(u) * time.Second / 4 } - if timeout < 3*time.Second { - timeout = 3 * time.Second + if timeout < time.Second { + timeout = time.Second } go wb.heartbeat(timeout)