diff --git a/microbitmatrix/microbitmatrix-v1.go b/microbitmatrix/microbitmatrix-v1.go index 7416d64..c4781b1 100644 --- a/microbitmatrix/microbitmatrix-v1.go +++ b/microbitmatrix/microbitmatrix-v1.go @@ -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 -} diff --git a/microbitmatrix/microbitmatrix-v2.go b/microbitmatrix/microbitmatrix-v2.go index 27f478e..a107fa3 100644 --- a/microbitmatrix/microbitmatrix-v2.go +++ b/microbitmatrix/microbitmatrix-v2.go @@ -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 -} diff --git a/microbitmatrix/microbitmatrix.go b/microbitmatrix/microbitmatrix.go index 7b23a90..f6a62ef 100644 --- a/microbitmatrix/microbitmatrix.go +++ b/microbitmatrix/microbitmatrix.go @@ -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 +}