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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user