Thanks guys, will have a look.
The link to download the lates library would also be highly regarded.
I've actually manage to get the code running with this code, although when the drone is flying it don't send the data. He can only send when has finished the flight command. I wonder how to make then work in parallel?
import time
def eventUpdateAttitude(data):
global height, horizontal_position_X, horizontal_position_Y
height = getHeight()
horizontal_position_X = horizontal_position.X
horizontal_position_Y = horizontal_position.Y
#set the event handler
drone = CoDrone.CoDrone(True, False, False, False, False)
drone.connect()
drone.setEventHandler([drone.getHeight(),drone.getOptFlowPosition()], eventUpdateAttitude)
horizontal_position = drone.getOptFlowPosition()
height = drone.getHeight()
drone.takeoff()
while(drone.isConnected()):
#request for the angle data
drone.sendRequest([drone.getHeight(),drone.getOptFlowPosition()])
time.sleep(0.05)#make sure to have a delay
print(horizontal_position.X, horizontal_position.Y,height)