|
|
|
@ -39,7 +39,7 @@ else:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# in both debug and production, emulator needs to draw the screen explicitly
|
|
|
|
|
if utils.EMULATOR or utils.MODEL in ("1", "R"):
|
|
|
|
|
if utils.EMULATOR or utils.INTERNAL_MODEL in ("T1B1", "T2B1"):
|
|
|
|
|
loop.after_step_hook = refresh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -120,7 +120,7 @@ class Component:
|
|
|
|
|
def __init__(self) -> None:
|
|
|
|
|
self.repaint = True
|
|
|
|
|
|
|
|
|
|
if utils.MODEL in ("T", "DISC1"):
|
|
|
|
|
if utils.INTERNAL_MODEL in ("T2T1", "D001"):
|
|
|
|
|
|
|
|
|
|
def dispatch(self, event: int, x: int, y: int) -> None:
|
|
|
|
|
if event is RENDER:
|
|
|
|
@ -143,7 +143,7 @@ class Component:
|
|
|
|
|
def on_touch_end(self, x: int, y: int) -> None:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
elif utils.MODEL in ("1", "R"):
|
|
|
|
|
elif utils.INTERNAL_MODEL in ("T1B1", "T2B1"):
|
|
|
|
|
|
|
|
|
|
def dispatch(self, event: int, x: int, y: int) -> None:
|
|
|
|
|
if event is RENDER:
|
|
|
|
@ -255,7 +255,7 @@ class Layout(Component):
|
|
|
|
|
Usually overridden to add another tasks to the list."""
|
|
|
|
|
return self.handle_input(), self.handle_rendering()
|
|
|
|
|
|
|
|
|
|
if utils.MODEL in ("T", "DISC1"):
|
|
|
|
|
if utils.INTERNAL_MODEL in ("T2T1", "D001"):
|
|
|
|
|
|
|
|
|
|
def handle_input(self) -> Generator:
|
|
|
|
|
"""Task that is waiting for the user input."""
|
|
|
|
@ -269,7 +269,7 @@ class Layout(Component):
|
|
|
|
|
# way to get the lowest input-to-render latency.
|
|
|
|
|
self.dispatch(RENDER, 0, 0)
|
|
|
|
|
|
|
|
|
|
elif utils.MODEL in ("1", "R"):
|
|
|
|
|
elif utils.INTERNAL_MODEL in ("T1B1", "T2B1"):
|
|
|
|
|
|
|
|
|
|
def handle_input(self) -> Generator:
|
|
|
|
|
"""Task that is waiting for the user input."""
|
|
|
|
|