mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-21 06:59:00 +00:00
fix bug
This commit is contained in:
@@ -8,18 +8,21 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
const height = 32
|
// Thumby will have preset size.
|
||||||
const width = 128
|
// If not compiling for thumby the width and height will be whatever we suggest
|
||||||
|
const suggestHeight = 32
|
||||||
|
const suggestWidth = 128
|
||||||
var display *ssd1306.Device
|
var display *ssd1306.Device
|
||||||
var err error
|
var err error
|
||||||
display, err = makeSSD1306(width, height)
|
display, err = makeSSD1306(suggestWidth, suggestHeight)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
display.ClearDisplay()
|
display.ClearDisplay()
|
||||||
|
|
||||||
x := int16(36)
|
width, height := display.Size()
|
||||||
y := int16(20)
|
x := int16(width)
|
||||||
|
y := int16(height)
|
||||||
deltaX := int16(1)
|
deltaX := int16(1)
|
||||||
deltaY := int16(1)
|
deltaY := int16(1)
|
||||||
for {
|
for {
|
||||||
|
|||||||
Reference in New Issue
Block a user