Rename patterns module to presets

Rename the driver module and update imports so tests and main entry use the new presets naming, while moving Preset to its own file.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-07 11:40:04 +13:00
parent f35d8f7084
commit 43957adb28
14 changed files with 253 additions and 225 deletions

View File

@@ -2,7 +2,7 @@
import utime
from machine import WDT
from settings import Settings
from patterns import Patterns
from presets import Presets
def main():
@@ -10,11 +10,11 @@ def main():
pin = s.get("led_pin", 10)
num = s.get("num_leds", 30)
p = Patterns(pin=pin, num_leds=num)
p = Presets(pin=pin, num_leds=num)
wdt = WDT(timeout=10000)
# Create an "off" preset
p.edit("test_off", {"pattern": "off"})
# Create an "off" preset (use short-key field `p` for pattern)
p.edit("test_off", {"p": "off"})
p.select("test_off")
start = utime.ticks_ms()