-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathepd7in5_dummy.py
65 lines (48 loc) · 1.2 KB
/
epd7in5_dummy.py
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import subprocess
# Display resolution
EPD_WIDTH = 800
EPD_HEIGHT = 480
EPD_IMAGE_PATH = 'epd_image.png'
class EPD:
"""
epd7in5 Dummy class.
"""
def __init__(self):
self.width = EPD_WIDTH
self.height = EPD_HEIGHT
# windowプロセスを起動する
self.winProc = subprocess.Popen(
['python', 'epd7in5_window.py']
)
def __del__(self):
# windowプロセスを終了させる
if self.winProc.poll:
self.winProc.kill()
def reset(self):
pass
def send_command(self, command):
pass
def send_data(self, data):
pass
def send_data2(self, data):
pass
def ReadBusy(self):
pass
def SetLut(self, lut_vcom, lut_ww, lut_bw, lut_wb, lut_bb):
pass
def init(self):
return 0
def getbuffer(self, image):
img = image
# 画像ファイルを保存する
img.save(EPD_IMAGE_PATH)
# dummyではbufは使わない
buf = bytearray()
return buf
def display(self, image):
pass
def Clear(self):
pass
def sleep(self):
pass
### END OF FILE ###