From fb01a8aebb489378a72bfe7f3f4151578200bee7 Mon Sep 17 00:00:00 2001 From: Matthias Blankertz Date: Sat, 20 Dec 2025 21:27:13 +0100 Subject: [PATCH 1/3] micropython: Fix filename unicode issues, enable compile-commands.json Signed-off-by: Matthias Blankertz --- software/lib/micropython | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 10ec080e5fdff74da145de3e295591da1dc0ab71 Mon Sep 17 00:00:00 2001 From: Matthias Blankertz Date: Sat, 20 Dec 2025 22:30:24 +0100 Subject: [PATCH 2/3] fix: app: Go to idle mode when playlist end is reached Signed-off-by: Matthias Blankertz --- software/src/app.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/software/src/app.py b/software/src/app.py index c2f79f3..6b99bf5 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 From c555ad94f0ae78d6ba53c1c7b9559c83915fbd73 Mon Sep 17 00:00:00 2001 From: Matthias Blankertz Date: Sat, 20 Dec 2025 22:30:55 +0100 Subject: [PATCH 3/3] fix: Increase watchdog timeout Workaround for #60 until it is fixed. Signed-off-by: Matthias Blankertz --- software/src/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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))