from djitellopy import Tello tello = Tello() tello.connect() bat = tello.get_battery() print(f"Battery level: {bat}%") if bat < 40: print("Battery too low!") tello.end() quit() tello.enable_mission_pads() tello.set_mission_pad_detection_direction(2) tello.takeoff() pad = tello.get_mission_pad_id() while pad != 1: print(pad) if pad == 4: tello.move_up(100) tello.flip_forward() tello.move_down(100) tello.move_forward(50) if pad == -1: tello.move_forward(50) pad = tello.get_mission_pad_id() tello.land()