How to close correctly the radio link

Firmware/software/electronics/mechanics
Post Reply
marco.tognon
Member
Posts: 38
Joined: Mon Sep 16, 2013 10:22 am

How to close correctly the radio link

Post by marco.tognon »

Hallo.

I'm worcking with my personal code. If i turn of the crazyflie and start my code all works correctly, but if then i close my code and try to run it again the callback connectSetupFinished doesn't come. I have to turn of and then turn on the crazyflie every time I want to start my code. Do you now why??

I guess it could depend on how I close my program and the radio link. For now i use:

Code: Select all

self.crazyflie.close_link()
Do you know if there is something better??

Cheers
hsanjuan
Beginner
Posts: 19
Joined: Sat Jul 20, 2013 10:51 am

Re: How to close correctly the radio link

Post by hsanjuan »

I wonder if this is actually causing the issue:

https://bitbucket.org/bitcraze/crazyfli ... ult#cl-186

Anyway try to print some debugging information to see where the client is actually getting stuck.
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: How to close correctly the radio link

Post by marcus »

Could you copy/paste the output from the console? What versions are you running of the cflib and the Crazyflie firmware?
marco.tognon
Member
Posts: 38
Joined: Mon Sep 16, 2013 10:22 am

Re: How to close correctly the radio link

Post by marco.tognon »

Marcus what do you mean with output from the console? Because I'm using my own code, I dont use the output console which you can see when you run the client!

As far as the version of th cflib and the firmware it is before addition of the hover mode, but I don't know where i can find the correct number of the version.
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: How to close correctly the radio link

Post by marcus »

You can configure the logger to print out debug info from the library in the console.

Code: Select all

import logging
logging.basicConfig(level=logging.DEBUG)
Post Reply