Debug output on second line

This commit is contained in:
Gregor Riepl 2021-05-06 10:30:50 +02:00
parent e7d8246759
commit af74f073a1

View file

@ -5,6 +5,7 @@ import (
"fmt" "fmt"
"log" "log"
"github.com/brutella/can" "github.com/brutella/can"
"time"
) )
const queueSize = 10 const queueSize = 10
@ -171,5 +172,16 @@ func (c *Can) Initialize() {
c.bus.Publish(EncodePowerRequest()) c.bus.Publish(EncodePowerRequest())
c.bus.Publish(EncodeDisplayRequest()) c.bus.Publish(EncodeDisplayRequest())
c.DisplayPrint(0, "Hello world") c.DisplayPrint(0, "Hello world")
go func() {
t := time.Tick(100 * time.Millisecond)
var d rune
for {
select {
case <-t:
c.DisplayPrint(1, string([]rune{d}))
d = (d + 1) & 0xff
}
}
}()
} }
} }