Debug output on second line
This commit is contained in:
parent
e7d8246759
commit
af74f073a1
1 changed files with 12 additions and 0 deletions
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue