def move_thread(): global step_set stand_stu = 1 while 1: if not steadyMode: if direction_command == 'forward' and turn_command == 'no': if SmoothMode: move.dove(step_set, 35, 0.001, DPI, 'no') step_set += 1 if step_set == 5: step_set = 1 continue else: move.move(step_set, 35, 'no') time.sleep(0.1) step_set += 1 if step_set == 5: step_set = 1 continue elif direction_command == 'backward' and turn_command == 'no': if SmoothMode: move.dove(step_set, -35, 0.001, DPI, 'no') step_set += 1 if step_set == 5: step_set = 1 continue else: move.move(step_set, -35, 'no') time.sleep(0.1) step_set += 1 if step_set == 5: step_set = 1 continue else: pass if turn_command != 'no': if SmoothMode: move.dove(step_set, 35, 0.001, DPI, turn_command) step_set += 1 if step_set == 5: step_set = 1 continue else: move.move(step_set, 35, turn_command) time.sleep(0.1) step_set += 1 if step_set == 5: step_set = 1 continue else: pass if turn_command == 'no' and direction_command == 'stand': move.stand() step_set = 1 pass else: move.steady_X() move.steady()
def directions(instructions): if instructions[0] == "Forward": move.forward() elif instructions[0] == "Left": move.left() elif instructions[0] == "Right": move.right() elif instructions[0] == "Standing": move.stand() elif instructions[0] == "Auto": move.autonom()