lilyinstarlight / python-ardrone

A Python library for controlling the Parrot AR.Drone 2.0 over a network
MIT License
26 stars 14 forks source link

ardrone.reset() function seems not to work. #5

Open dawid2193487 opened 6 years ago

dawid2193487 commented 6 years ago

According to the documentation, .reset() should toggle between normal and emergency states.

After restarting the drone I execute this code


print "Importing ardrone"
import ardrone

print "Done."

drone = ardrone.ARDrone()

time.sleep(1.0)
drone.takeoff()
time.sleep(3.0)
drone.hover()
time.sleep(7.0)
drone.move_left()
time.sleep(1.0)
drone.land()
time.sleep(1.0)

drone.halt()

and it works perfectly fine the first time. The drone is in emergency state after landing, indicated by the diodes turning red.

I attempt to get it back to a working state by executing this script

drone = ardrone.ARDrone()

drone.reset()
time.sleep(1.0)

drone.halt()

However, the drone remains in emergency state. Only way to get it out of it is to power cycle it. I haven't attempted toggling emergency off with the mobile app.