repo: archive legacy pico dashboard

This commit is contained in:
2026-06-09 00:52:00 -06:00
parent 9cb06b86ff
commit f5e2c5fd24
38 changed files with 107 additions and 20 deletions
@@ -0,0 +1,31 @@
class Display:
def __init__(self, driver=None):
self.driver = driver
self.commands = []
def clear(self):
self.commands.append(("clear",))
def text(self, x, y, value, size=1):
self.commands.append(("text", x, y, str(value), size))
def rect(self, x, y, w, h, filled=False):
self.commands.append(("rect", x, y, w, h, filled))
def flush(self):
if not self.driver:
return
for command in self.commands:
name = command[0]
if name == "clear":
self.driver.clear()
elif name == "text":
_, x, y, value, size = command
self.driver.text(x, y, value, size)
elif name == "rect":
_, x, y, w, h, filled = command
self.driver.rect(x, y, w, h, filled)
self.commands = []