add SNRdB, but requires proper frontend support
[enigma2.git] / lib / python / Components / Converter / Poll.py
index 3ba5e87f51cfb1a3825dc624ccee27d2f0c4ec09..060c12ea68a654de49bcde002979352039a26eaf 100644 (file)
@@ -3,7 +3,7 @@ from enigma import eTimer
 class Poll(object):
        def __init__(self):
                self.__poll_timer = eTimer()
-               self.__poll_timer.timeout.get().append(self.changed)
+               self.__poll_timer.timeout.get().append(self.poll)
                self.__interval = 1000
                self.__enabled = False
 
@@ -20,3 +20,12 @@ class Poll(object):
 
        poll_interval = property(lambda self: self.__interval, __setInterval)
        poll_enabled = property(lambda self: self.__enabled, __setEnable)
+
+       def poll(self):
+               self.changed((self.CHANGED_POLL,))
+
+       def doSuspend(self, suspended):
+               self.enabled = not suspended
+               if not suspended:
+                       self.poll()
+