Skip to content

Commit

Permalink
feat: adds experimental ability to autorun boot.dd
Browse files Browse the repository at this point in the history
  • Loading branch information
lavafroth committed Aug 5, 2023
1 parent a1f69f5 commit b761c66
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,15 @@ def api(request: Request):
server.serve_forever(str(wifi.radio.ipv4_address_ap))


async def run_boot_script():
boot_script = 'payloads/boot.dd'
if os.path.exists(boot_script):
run_script_file(boot_script)


if __name__ == "__main__":
try:
asyncio.run(main())
asyncio.gather(main(), run_boot_script())
# For some reason, wifi.stop_ap is not implemented.
except NotImplementedError:
microcontroller.reset()

0 comments on commit b761c66

Please sign in to comment.