MahatmaX / YADrone

Yet Another Drone Framework (for the AR.Drone 2)
39 stars 40 forks source link

Automatically reconnect to ARDrone #28

Open m-revetria opened 9 years ago

m-revetria commented 9 years ago

Currently, if the socket got disconnected, NavDataManager class always catch a SocketTimeoutException and just prints the message "Navdata reception timeout".

I would appreciate if you can tell me how to handle this case and manually reconnect to the drone. For the moment I changed the code to automatically reconnect if it is necessary, you could see the modification on this fork: https://github.com/m-revetria/YADrone

MahatmaX commented 9 years ago

Hi Miguel, at first glance your addition looks ok. Unfortunately I am unable to test it, because I currently have no access to my drone.

Moreover you should keep in mind, that the drone itself has some build-in emergency mode that tells the drone to immediately turn off the motor as soon as the Wifi connection breaks. As I am only flying indoor I have not tested this yet. But in case you experience anything like that you might want to look at the drone's internal log (accessible e.g. via YADrone's ControlCenter).

If your code works fine, I would integrate it into the main branch. Could you tell me about your findings when testing ?

Thanks, Dirk

Am 11.01.2015 um 01:18 schrieb Miguel Revetria:

Currently, if the socket got disconnected, NavDataManager class always catch a SocketTimeoutException and just prints the message "Navdata reception timeout".

I would appreciate if you can tell me how to handle this case and manually reconnect to the drone. For the moment I changed the code to automatically reconnect if it is necessary, you could see the modification on this fork: https://github.com/m-revetria/YADrone

— Reply to this email directly or view it on GitHub https://github.com/MahatmaX/YADrone/issues/28.