diff --git a/badge_store/icon.gif b/badge_store/icon.gif new file mode 100644 index 0000000..459f81c Binary files /dev/null and b/badge_store/icon.gif differ diff --git a/home_default/bg.gif b/home_default/bg.gif deleted file mode 100644 index e9055b6..0000000 Binary files a/home_default/bg.gif and /dev/null differ diff --git a/launcher/main.py b/launcher/main.py index 7c59e73..3fa84e1 100644 --- a/launcher/main.py +++ b/launcher/main.py @@ -6,4 +6,20 @@ ___categories___ = ["System"] ___launchable___ = False ___bootstrapped___ = True +import ugfx + +ugfx.clear() +apps = range(1, 10) + +cols = 4 + + +for i, p in enumerate(apps): + logical_x = i % cols + logical_y = i // cols + x = logical_x * width + + + + print("launcher") diff --git a/lib/buttons.py b/lib/buttons.py index 14616b1..8b3643c 100644 --- a/lib/buttons.py +++ b/lib/buttons.py @@ -15,6 +15,13 @@ CONFIG = { "BTN_B": pyb.Pin.PULL_UP } +ROTATION_MAP = { + "JOY_UP": "JOY_LEFT", + "JOY_LEFT": "JOY_DOWN", + "JOY_DOWN": "JOY_RIGHT", + "JOY_RIGHT": "JOY_UP", +} + _tilda_pins = {} _tilda_interrupts = {} _tilda_bounce = {} @@ -31,6 +38,11 @@ def init(buttons = CONFIG.keys()): _tilda_pins[button] = pyb.Pin(button, pyb.Pin.IN) _tilda_pins[button].init(pyb.Pin.IN, CONFIG[button]) +def rotate(button): + """remaps names of buttons to rotated values""" + return ROTATION_MAP[button] + + def is_pressed(button): pin = _get_pin(button) if pin.pull() == pyb.Pin.PULL_DOWN: diff --git a/lib/homescreen.py b/lib/homescreen.py index 4165ad6..de8c7fa 100644 --- a/lib/homescreen.py +++ b/lib/homescreen.py @@ -12,7 +12,6 @@ In particular, they *should*: They also *may*: * Display a name, returned by "homescreen.name()" -* Display network strength "homescreen.mobile_strength()" (0-1, might return "None" if no SIM card found) * Display network strength "homescreen.wifi_strength()" (0-1, might return "None" if not connected) * Display remaining battery "homescreen.battery()" (0-1) """