Tuning via Bookmarks

Fixed a timing bug when re-tuning from a current station by double-clicking a bookmark, causing a whole host of problems. The bookmark click kills the current nrsc5 process then restarts with new freq and stream number. In some instances, the polling loop keeps plugging away and doesn't know the nrsc5 was killed. Adding a short 1 second delay between killing and re-tuning fixes the problem and allows processes the appropriate time to synch up.
This commit is contained in:
markjfine 2021-04-08 10:21:41 -04:00 committed by GitHub
parent abf7c79e37
commit d46533a96c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -741,7 +741,7 @@ class NRSC5_DUI(object):
# stop playback if playing # stop playback if playing
if (self.playing): if (self.playing):
self.on_btnStop_clicked(None) self.on_btnStop_clicked(None)
time.sleep(1)
# play bookmarked station # play bookmarked station
self.on_btnPlay_clicked(None) self.on_btnPlay_clicked(None)