microbitmatrix: move Size() to verion agnostic part

This commit is contained in:
Lucas Bremgartner
2022-10-05 16:08:44 +02:00
committed by Ron Evans
parent b2fdd3c333
commit a106fd48ce
3 changed files with 5 additions and 11 deletions
-6
View File
@@ -70,7 +70,6 @@ func (d *Device) Display() error {
if d.buffer[row][col] {
d.pin[col].Low()
}
}
time.Sleep(time.Millisecond * 2)
}
@@ -105,8 +104,3 @@ func (d *Device) EnableAll() {
d.pin[i-machine.LED_COL_1].High()
}
}
// Size returns the current size of the display.
func (d *Device) Size() (w, h int16) {
return 5, 5
}
-5
View File
@@ -114,8 +114,3 @@ func (d *Device) EnableAll() {
d.pin[5+i].High()
}
}
// Size returns the current size of the display.
func (d *Device) Size() (w, h int16) {
return 5, 5
}
+5
View File
@@ -40,3 +40,8 @@ func (d *Device) GetPixel(x int16, y int16) bool {
}
return d.buffer[matrixRotations[d.rotation][y][x][0]][matrixRotations[d.rotation][y][x][1]]
}
// Size returns the current size of the display.
func (d *Device) Size() (w, h int16) {
return 5, 5
}