Exemplo n.º 1
0
 def test_3_Axis(self):
     print "starting Axis test, press a to pass, b to fail"
     while True:
         time.sleep(0.1)
         cont.update()
         if cont.getButton(cont.A):
             break
         if cont.getButton(cont.B):
             self.assertEqual(True, False, "Axis Test Failed")
         print "X: ", cont.getPrimaryX(), " Y: ", cont.getPrimaryY(), " X2: ", cont.getSecondaryX(), " Y2: ", cont.getSecondaryY()
Exemplo n.º 2
0
 def test_3_Axis(self):
     print "starting Axis test, press a to pass, b to fail"
     while True:
         time.sleep(0.1)
         cont.update()
         if cont.getButton(cont.A):
             break
         if cont.getButton(cont.B):
             self.assertEqual(True, False, "Axis Test Failed")
         print "X: ", cont.getPrimaryX(), " Y: ", cont.getPrimaryY(
         ), " X2: ", cont.getSecondaryX(), " Y2: ", cont.getSecondaryY()
Exemplo n.º 3
0
 def test_2_buttonsWorking(self):
     notDone = True
     print "starting button test"
     buttons = [False] * cont.getNumButtons()
     print "NumButtons", cont.getNumButtons()
     while notDone:
         cont.update()
         for x in range(0, cont.getNumButtons()):
             if cont.getButton(x) and buttons[x] == False:
                 print "button ", x
                 buttons[x] = True
         if all(buttons):
             notDone = False
Exemplo n.º 4
0
 def test_2_buttonsWorking(self):
     notDone = True
     print "starting button test"
     buttons = [False] * cont.getNumButtons()
     print "NumButtons", cont.getNumButtons()
     while notDone:
         cont.update()
         for x in range(0, cont.getNumButtons()):
             if cont.getButton(x) and buttons[x] == False:
                 print "button ", x
                 buttons[x] = True
         if all(buttons):
             notDone = False