Add line offset
This commit is contained in:
parent
2ca9c28c5c
commit
e7d8246759
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ func (c *Can) DisplayWrite(line int, a []byte) error {
|
||||||
// print in separate chunks, as one frame payload is limited to 7 bytes
|
// print in separate chunks, as one frame payload is limited to 7 bytes
|
||||||
// the display has only 16 characters per line, so we truncate there
|
// the display has only 16 characters per line, so we truncate there
|
||||||
for i := 0; i < min(len(a), 16); i += 7 {
|
for i := 0; i < min(len(a), 16); i += 7 {
|
||||||
err := c.bus.Publish(DisplayCommand{addr, a[i:min(i+7,len(a))]}.Encode())
|
err := c.bus.Publish(DisplayCommand{addr + i, a[i:min(i+7,len(a))]}.Encode())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue