Minor lint fixes

pull/79/head
George Sexton 2 years ago
parent 2cb4a0657c
commit fc5e68c4cf

@ -51,6 +51,8 @@ func Example() {
dev.SetGlyphs(max7219.CP437Glyphs, true)
dev.SetDecode(max7219.DecodeNone)
dev.ScrollChars([]byte("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"), 1, 100*time.Millisecond)
} else {
dev.SetDecode(max7219.DecodeB)
}
// display a count

@ -290,10 +290,6 @@ func (d *Dev) writeChars(bytes []byte) error {
copy(x, d.glyphs[0x20])
w[ix] = x
}
limit := len(bytes)
if limit > len(w) {
limit = len(w)
}
charPos := len(bytes) - 1
for ix := d.units - 1; ix >= 0 && charPos >= 0; ix-- {
w[ix] = d.glyphs[bytes[charPos]]

@ -217,9 +217,9 @@ func TestCommand(t *testing.T) {
defer pb.Close()
record := &spitest.Record{}
dev, err := NewSPI(record, 4, 8)
dev, _ := NewSPI(record, 4, 8)
record.Ops = make([]conntest.IO, 0)
err = dev.SetIntensity(0x0b)
err := dev.SetIntensity(0x0b)
if err != nil {
t.Error(err)

Loading…
Cancel
Save