def utilsMotors(): motors = Motors() while True: print "---------------------------" print "utils for Motors" print "---------------------------" print """ 1 --> calibrate ESC 2 --> test motor 0 --> go back """ if choice2 == None: choice = raw_input('please set action and press enter\n') else: choice = choice2 if choice == '1': choice = raw_input('please set the motor id to ccalibrate\n') if not choice == 'all' : choice = int(choice) motors.calibrate(choice) elif choice == '2': choice = raw_input('please set the motor id to test\n') motors.test(int(choice)) elif choice == '0': return else: print "This choice is not reconized, try again"