Compare commits
2 commits
cd823a75d6
...
152290f5a3
Author | SHA1 | Date | |
---|---|---|---|
Rahix | 152290f5a3 | ||
6f93b96c39 |
|
@ -101,6 +101,11 @@ func (d *daemon) modbusUpdate() {
|
|||
// TODO: Input mapping goes here
|
||||
}
|
||||
|
||||
// We must wait between reading and writing to the -KEC1 relay board
|
||||
// because otherwise it chokes and times out the write registers
|
||||
// command.
|
||||
time.Sleep(time.Millisecond * 10)
|
||||
|
||||
// KFA1-KFA8
|
||||
var relayState [8]bool
|
||||
d.mu.Lock()
|
||||
|
@ -135,7 +140,7 @@ func (d *daemon) modbusUpdate() {
|
|||
|
||||
err = d.modbusClient.WriteRegisters(0x01, registerValuesKEC1[:])
|
||||
if err != nil {
|
||||
klog.Warningf("error while writing updated relay values to KEC1 %v", err)
|
||||
klog.Warningf("error while updating registers %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue