RecordTimer.py: fix typo
[vuplus_dvbapp] / tests / enigma.py
index 31ebd74..2bf2a59 100644 (file)
@@ -25,8 +25,10 @@ class eTimer:
        def __init__(self):
                self.timeout = slot()
                self.next_activation = None
+               print "NEW TIMER"
        
        def start(self, msec, singleshot = False):
+               print "start timer", msec
                self.next_activation = time.time() + msec / 1000.0
                self.msec = msec
                self.singleshot = singleshot
@@ -49,6 +51,8 @@ def runIteration():
        assert len(running_timers), "no running timers, so nothing will ever happen!"
        running_timers.sort(key=lambda x: x.next_activation)
        
+       print "running:", running_timers
+       
        next_timer = running_timers[0]
 
        now = time.time()
@@ -71,7 +75,7 @@ def stop():
 def run(duration = 1000):
        stoptimer = eTimer()
        stoptimer.start(duration * 1000.0)
-       stoptimer.timeout.get().append(stop)
+       stoptimer.callback.append(stop)
        while not stopped:
                runIteration()
 
@@ -127,6 +131,9 @@ class pNavigation:
        def playService(self, service):
                return None
 
+       def __repr__(self):
+               return "pNavigation"
+
 eRCInput = None
 getPrevAsciiCode = None
 
@@ -274,19 +281,11 @@ class eServiceCenter:
 
 eServiceCenter()
 
-##################### ENIGMA CONFIG
-
-import Components.config
-
-my_config = [
-"config.skin.primary_skin=None\n"
-]
-
-Components.config.config.unpickle(my_config)
-
 ##################### ENIGMA CHROOT
 
+print "import directories"
 import Tools.Directories
+print "done"
 
 chroot="."
 
@@ -295,7 +294,18 @@ for (x, (y, z)) in Tools.Directories.defaultPaths.items():
 
 Tools.Directories.defaultPaths[Tools.Directories.SCOPE_SKIN] = ("../data/", Tools.Directories.PATH_DONTCREATE)
 Tools.Directories.defaultPaths[Tools.Directories.SCOPE_CONFIG] = ("/etc/enigma2/", Tools.Directories.PATH_DONTCREATE)
-                
+
+##################### ENIGMA CONFIG
+
+print "import config"
+import Components.config
+print "done"
+
+my_config = [
+"config.skin.primary_skin=None\n"
+]
+
+Components.config.config.unpickle(my_config)
 
 ##################### ENIGMA ACTIONS
 
@@ -307,14 +317,17 @@ class eActionMap:
 ##################### ENIGMA STARTUP:
 
 def init_nav():
+       print "init nav"
        import Navigation, NavigationInstance
        NavigationInstance.instance = Navigation.Navigation()
 
 def init_record_config():
+       print "init recording"
        import Components.RecordingConfig
        Components.RecordingConfig.InitRecordingConfig()
 
 def init_parental_control():
+       print "init parental"
        from Components.ParentalControl import InitParentalControl
        InitParentalControl()
 
@@ -346,7 +359,5 @@ def init_all():
        import Components.RFmod
        Components.RFmod.InitRFmod()
 
-       import Components.NimManager
-
        import Screens.Ci
        Screens.Ci.InitCiConfig()