Removed DBs that won't be used (using ACV until I can find an ESV). Added boot.py that's needed for micropython. Main.py scheduler needs to be cleaned up.

This commit is contained in:
Norm Rasmussen
2025-02-03 14:47:17 -05:00
parent 12a6d47e73
commit ed5a857001
5 changed files with 7 additions and 26 deletions

BIN
OEB.db

Binary file not shown.

BIN
asv.db

Binary file not shown.

7
boot.py Normal file
View File

@ -0,0 +1,7 @@
# boot.py -- run on boot-up
# can run arbitrary Python, but best to keep it minimal
import pyb
#pyb.main('main.py') # main script to run after this one
#pyb.usb_mode('CDC+MSC') # act as a serial and a storage device
#pyb.usb_mode('CDC+HID') # act as a serial device and a mouse

View File

@ -1,26 +0,0 @@
import errno
import os
import signal
import functools
class TimeoutError(Exception):
pass
def timeout(seconds=10, error_message=os.strerror(errno.ETIME)):
def decorator(func):
def _handle_timeout(signum, frame):
raise TimeoutError(error_message)
@functools.wraps(func)
def wrapper(*args, **kwargs):
signal.signal(signal.SIGALRM, _handle_timeout)
signal.alarm(seconds)
try:
result = func(*args, **kwargs)
finally:
signal.alarm(0)
return result
return wrapper
return decorator

0
verses
View File