Code: Select all
async def ana_sayfa_as(r, ayar):
pb.press_func(False)
pb.release_func(menu,)
pb.long_func(gizli_menu,)
sb.press_func(seri,)
tb.press_func(tek_at,)
async def main():
global a1
global t1
t1 = uasyncio.create_task(rotar(r, ayar))
a1 = uasyncio.create_task(ana_sayfa_as(r, ayar))
await uasyncio.gather(t1,a1)
uasyncio.run(main())
I was able to cancel the "ana_sayfa" task when I pressed the button with the firmware.
With recent changes in git repo I can't anymore. i am getting error like this
Code: Select all
File "uasyncio/funcs.py", line 1, in gather File "uasyncio/core.py", line 1, in run_until_complete File "main.py", CancelledError:
I looked here but I don't understand