diff --git a/software/lib/micropython b/software/lib/micropython index 4ecb409..6fdbf1d 160000 --- a/software/lib/micropython +++ b/software/lib/micropython @@ -1 +1 @@ -Subproject commit 4ecb4099cf3a966bdc6edcb6ffd05e17de019a72 +Subproject commit 6fdbf1d3395c1296646a2e024831052162e27abd diff --git a/software/src/app.py b/software/src/app.py index 72d10c2..344abed 100644 --- a/software/src/app.py +++ b/software/src/app.py @@ -104,9 +104,6 @@ class PlayerApp: self._pause_toggle() def onPlaybackDone(self): - assert self.mp3file is not None - self.mp3file.close() - self.mp3file = None self._play_next() def onIdleTimeout(self): @@ -141,9 +138,7 @@ class PlayerApp: self.playlist = None def _play_next(self): - if self.playlist is None: - return - filename = self.playlist.getNextPath() + filename = self.playlist.getNextPath() if self.playlist is not None else None self._play(filename) if filename is None: self.playlist = None diff --git a/software/src/main.py b/software/src/main.py index 09afe34..e1e7b15 100644 --- a/software/src/main.py +++ b/software/src/main.py @@ -58,7 +58,7 @@ async def wdt_task(wdt): # TODO: more checking of app health # Right now this only protects against the asyncio executor crashing completely while True: - await asyncio.sleep_ms(500) + await asyncio.sleep_ms(100) wdt.feed() DB_PATH = '/sd/tonberry.db' @@ -105,7 +105,7 @@ def run(): start_webserver(config, the_app) # Start - wdt = machine.WDT(timeout=1000) + wdt = machine.WDT(timeout=2000) asyncio.create_task(aiorepl.task({'timer_manager': TimerManager(), 'app': the_app})) asyncio.create_task(wdt_task(wdt))