forked from ev3go/ev3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlcd.go
26 lines (20 loc) · 780 Bytes
/
lcd.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright ©2016 The ev3go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ev3
import (
"github.com/ev3go/ev3dev"
"github.com/ev3go/ev3dev/fb"
)
const (
// LCDWidth is the width of the LCD screen in pixels.
LCDWidth = 178
// LCDHeight is the height of the LCD screen in pixels.
LCDHeight = 128
// LCDStride is the width of the LCD screen memory in bytes.
LCDStride = 24
)
// LCD is the draw image used draw directly to the ev3 LCD screen.
// Drawing operations are safe for concurrent use, but are not atomic
// beyond the pixel level. It must be initialized before use.
var LCD = ev3dev.NewFrameBuffer("/dev/fb0", fb.NewMonochromeWith, LCDWidth, LCDHeight, LCDStride)