Remove unused pattern tests
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
import utime
|
||||
import uasyncio as asyncio
|
||||
from machine import WDT
|
||||
from settings import Settings
|
||||
from patterns import Patterns
|
||||
|
||||
|
||||
def run():
|
||||
async def main():
|
||||
s = Settings()
|
||||
pin = s.get("led_pin", 10)
|
||||
num = s.get("num_leds", 30)
|
||||
@@ -15,20 +15,20 @@ def run():
|
||||
p.set_param("br", 64)
|
||||
p.set_param("dl", 120)
|
||||
p.set_param("cl", [(255, 0, 0), (0, 0, 255)])
|
||||
p.set_param("pt", "on")
|
||||
|
||||
start = utime.ticks_ms()
|
||||
while utime.ticks_diff(utime.ticks_ms(), start) < 800:
|
||||
p.tick()
|
||||
wdt.feed()
|
||||
utime.sleep_ms(10)
|
||||
|
||||
p.set_param("pt", "off")
|
||||
p.tick()
|
||||
utime.sleep_ms(100)
|
||||
p.select("on")
|
||||
task = asyncio.create_task(p.run())
|
||||
await asyncio.sleep_ms(800)
|
||||
p.stopped = True
|
||||
await task
|
||||
p.stopped = False
|
||||
p.select("off")
|
||||
task = asyncio.create_task(p.run())
|
||||
await asyncio.sleep_ms(100)
|
||||
p.stopped = True
|
||||
await task
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
asyncio.run(main())
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user