Compare commits
3 Commits
71949bdd1a
...
c555ad94f0
| Author | SHA1 | Date | |
|---|---|---|---|
| c555ad94f0 | |||
| 10ec080e5f | |||
| fb01a8aebb |
Submodule software/lib/micropython updated: 4ecb4099cf...6fdbf1d339
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user