예제 #1
0
    def test_terminate_application(self):
        """ Kills the running application (if none runnig, it starts it) """
        import time
        if not is_app_running():
            self.tetris.execute()
            time.sleep(5)

        app = get_app_running()

        # guarantee the application is running
        self.assertNotEqual(app, None)

        kill_app_running()

        time.sleep(5)

        self.assertNotEqual(app.poll(), None)
예제 #2
0
    def on_gesture(self, gesture, touch):

        logger.debug("PROJECTORS STATE: %d" % self.activity_checker.projectors_on)

        if not self.activity_checker.projectors_on:
            logger.info('Turning Projectors On')
            self.activity_checker.turn_projectors_power(1)
        self.activity_checker.set_last_activity()
            
        logger.debug('gesture: %d' % self.counter)
        self.counter += 1
        #print self.gestures.gesture_to_str(gesture)
        
        # gesture recognition
        if self.gestures.find(gesture, GESTURE_ACCEPTANCE_MARGIN) and is_app_running():
            logger.debug("gesture recognized")
            kill_app_running()
예제 #3
0
    def test_terminate_application(self):
        """ Kills the running application (if none runnig, it starts it) """
        import time
        if not is_app_running():
            self.tetris.execute()
            time.sleep(5)

        app = get_app_running()
        
        # guarantee the application is running
        self.assertNotEqual(app, None)

        kill_app_running()
         
        time.sleep(5)
        
        self.assertNotEqual(app.poll(), None)
예제 #4
0
    def on_gesture(self, gesture, touch):

        logger.debug("PROJECTORS STATE: %d" %
                     self.activity_checker.projectors_on)

        if not self.activity_checker.projectors_on:
            logger.info('Turning Projectors On')
            self.activity_checker.turn_projectors_power(1)
        self.activity_checker.set_last_activity()

        logger.debug('gesture: %d' % self.counter)
        self.counter += 1
        #print self.gestures.gesture_to_str(gesture)

        # gesture recognition
        if self.gestures.find(gesture,
                              GESTURE_ACCEPTANCE_MARGIN) and is_app_running():
            logger.debug("gesture recognized")
            kill_app_running()