Added debug output to Monitor()

This commit is contained in:
Jarno Rankinen 2023-02-24 21:55:24 +02:00
parent 6ffb90b848
commit 6198d2b522
1 changed files with 7 additions and 0 deletions

View File

@ -348,7 +348,14 @@ func parseStatus(value int) string {
func (p *PingvinKL) Monitor(interval int) {
for {
time.Sleep(time.Duration(interval) * time.Second)
if p.debug {
log.Println("DEBUG: Updating values")
}
p.Update()
if p.debug {
log.Println("DEBUG: coils:", p.Coils)
log.Println("DEBUG: registers:", p.Registers)
}
}
}