Change wakeup timeout to 30s

This commit is contained in:
andig 2022-02-10 21:38:07 +01:00
parent 0eba146447
commit b35c4420f1
2 changed files with 4 additions and 4 deletions

View file

@ -132,7 +132,7 @@ func (wb *HeidelbergEC) Status() (api.ChargeStatus, error) {
return api.StatusE, nil
case 10:
if wb.wakeup {
// Keep Status B2 during Wakeup
// keep status B2 during wakeup
return api.StatusB, nil
}
return api.StatusF, nil
@ -272,13 +272,13 @@ var _ api.AlarmClock = (*HeidelbergEC)(nil)
// WakeUp implements the api.AlarmClock interface
func (wb *HeidelbergEC) WakeUp() error {
// Force Status F by locking
// force status F by locking
err := wb.set(hecRegRemoteLock, 0)
if err == nil {
// Always takes at least ~10 sec to return to normal operation
// after locking even if unlocking immediately.
wb.wakeup = true
// Return to normal operation by unlocking after ~10 sec
// return to normal operation by unlocking after ~10 sec
err = wb.set(hecRegRemoteLock, 1)
}
return err

View file

@ -7,7 +7,7 @@ import (
"github.com/benbjohnson/clock"
)
const wakeupTimeout = 60 * time.Second
const wakeupTimeout = 30 * time.Second
// Timer measures active time between start and stop events
type Timer struct {