From fcab0b71ae45ed2ba260dccc156f95b2aa343059 Mon Sep 17 00:00:00 2001 From: Pecusx Date: Sat, 26 Nov 2016 19:39:54 +0100 Subject: [PATCH] minor changes --- radio4.py | 4 ++-- radio_class.py | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/radio4.py b/radio4.py index d69293f..2db35bc 100755 --- a/radio4.py +++ b/radio4.py @@ -415,7 +415,7 @@ def get_switch_states(lcd,radio,rss): if display_mode == radio.MODE_SOURCE: radio.toggleSource(UP) - radio.setReload(True) + #radio.setReload(True) elif display_mode == radio.MODE_SEARCH: wait = 0.5 @@ -444,7 +444,7 @@ def get_switch_states(lcd,radio,rss): if display_mode == radio.MODE_SOURCE: radio.toggleSource(DOWN) - radio.setReload(True) + #radio.setReload(True) elif display_mode == radio.MODE_SEARCH: wait = 0.5 diff --git a/radio_class.py b/radio_class.py index d91eb69..cecb80b 100755 --- a/radio_class.py +++ b/radio_class.py @@ -347,13 +347,14 @@ class Radio: # Sleep mode - forcing timer (Pecus) elif key == 'KEY_SLEEP': # (Pecus) - self.timerValue = 1 # (Pecus) - self.timerOn() # (Pecus) - now = int(time.time()) # (Pecus) - self.timeTimer = now - self.timerValue * 60 # (Pecus) - self.fireTimer() # (Pecus) - time.sleep(0.5) # Zapobiega przewinieciu sie calego tytulu pandory na LCD przed wylaczeniem... dlaczego??? - self.setInterrupt() # (Pecus) + if self.display_mode != self.MODE_SLEEP: # no in sleep mode! (Pecus) + self.timerValue = 1 # (Pecus) + self.timerOn() # (Pecus) + now = int(time.time()) # (Pecus) + self.timeTimer = now - self.timerValue * 60 # (Pecus) + self.fireTimer() # (Pecus) + time.sleep(0.5) # Zapobiega przewinieciu sie calego tytulu pandory na LCD przed wylaczeniem... dlaczego??? + self.setInterrupt() # (Pecus) # Wakeup from sleep - forcing menu and unmute (Pecus) elif key == 'KEY_WAKEUP': # (Pecus)