mirror of
https://github.com/Pecusx/piradio-mini.git
synced 2026-05-20 22:33:44 +02:00
Sleep Timer button added
After this update, you need to change the remote control to another. And after the restart, change the remote control back to the right one.
This commit is contained in:
@@ -363,6 +363,14 @@ class Radio:
|
|||||||
self.setDisplayMode(display_mode) # (Pecus)
|
self.setDisplayMode(display_mode) # (Pecus)
|
||||||
self.setInterrupt() # (Pecus)
|
self.setInterrupt() # (Pecus)
|
||||||
|
|
||||||
|
elif key == 'KEY_TIME': # timer on/off (Pecus)
|
||||||
|
if self.display_mode != self.MODE_SLEEP: # no in sleep mode! (Pecus)
|
||||||
|
if self.getTimer():
|
||||||
|
self.timerOff()
|
||||||
|
else:
|
||||||
|
self.timerOn()
|
||||||
|
self.setInterrupt() # (Pecus)
|
||||||
|
|
||||||
|
|
||||||
# Handle left,right, up and down keys
|
# Handle left,right, up and down keys
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ def listener():
|
|||||||
listener.register('KEY_RADIO',handleIRevent) # (Pecus)
|
listener.register('KEY_RADIO',handleIRevent) # (Pecus)
|
||||||
listener.register('KEY_MEDIA',handleIRevent) # (Pecus)
|
listener.register('KEY_MEDIA',handleIRevent) # (Pecus)
|
||||||
listener.register('KEY_PANDORA',handleIRevent) # (Pecus)
|
listener.register('KEY_PANDORA',handleIRevent) # (Pecus)
|
||||||
|
listener.register('KEY_TIME',handleIRevent) # (Pecus)
|
||||||
log.message("Activating IR Remote Control listener", log.DEBUG)
|
log.message("Activating IR Remote Control listener", log.DEBUG)
|
||||||
listener.activate()
|
listener.activate()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user