Пример #1
0
 def test_func(self):
     self.__clear__()
     check = Test(
         '/dev/ttyACM0', 115200
     )  # initialises a test object and will access the port on a seperate line
     done = False
     while not done:
         QuickyTable("Motors", "LCD", "Sensor", "Servo", "All")
         try:
             test_check = int(input("(~) What do you want to test?: "))
         except NameError:
             #self.__clear__()
             print "(-) Invalid input, please try again "
             new = Menu()
         done = True
         if test_check == 0:
             check.motor()
         elif test_check == 1:
             check.lcd()
         elif test_check == 2:
             check.sensor()
         elif test_check == 3:
             check.servo()
         elif test_check == 4:
             check.full_check()
         else:
             done = False
             print "(-) Invalid input, please try again "
     check.log()
     new = Menu()