improve display
- display config has only one line for startup text - faster display daeomon startup - added newer fonts (e.g. medium) to display.py
This commit is contained in:
@ -37,12 +37,14 @@ SET_STARTUP = 0xf2
|
||||
|
||||
IDENT = 0xf3
|
||||
|
||||
FONT_GEO = [(6, 8), (8, 16), (20, 40)]
|
||||
FONT_GEO = [(6, 8), (8, 16), (20, 40), (38,64), (16, 16), (12, 24)]
|
||||
|
||||
TOPGAP = 8 # upper part of display is not useable
|
||||
HEIGHT = 120
|
||||
WIDTH = 480
|
||||
|
||||
MAGIC = b'\xcb\xef\x20\x18'
|
||||
|
||||
|
||||
def xy(x, y):
|
||||
x = min(480, int(x))
|
||||
@ -83,7 +85,7 @@ class Display:
|
||||
if daemon:
|
||||
threading.Thread(target=self.gethostthread, daemon=True).start()
|
||||
self.event.wait(1) # wait for thread to be started
|
||||
self.refresh()
|
||||
self.net_display(None)
|
||||
|
||||
def reset(self):
|
||||
self.send(MODE_GRAPH)
|
||||
@ -200,7 +202,6 @@ class Display:
|
||||
return
|
||||
if data[0] == TOUCH and len(data) == 3:
|
||||
x = (data[1] % 2) * 256 + data[2]
|
||||
print(x)
|
||||
return x
|
||||
print('skipped', data)
|
||||
|
||||
|
Reference in New Issue
Block a user