Mennekes Compact: start heartbeat immediately
This commit is contained in:
parent
d3ae335011
commit
b86fbfa76e
1 changed files with 1 additions and 1 deletions
|
|
@ -116,7 +116,7 @@ func NewMennekesCompact(uri, device, comset string, baudrate int, proto modbus.P
|
|||
}
|
||||
|
||||
func (wb *MennekesCompact) heartbeat(timeout time.Duration) {
|
||||
for range time.Tick(timeout) {
|
||||
for ; true; <-time.Tick(timeout) {
|
||||
if _, err := wb.conn.WriteSingleRegister(mennekesRegHeartbeat, mennekesHeartbeatToken); err != nil {
|
||||
wb.log.ERROR.Println("heartbeat:", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue