Debug tool

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
Hada Hamdi
Posts: 28
Joined: Wed Jul 22, 2020 4:19 am

Debug tool

Post by Hada Hamdi »


I'm looking for a way to print some messages, for example, I'm trying to implement a function to control the crazyflie, when I flash it, I didn't know whether it is correct or not, it returns just data in real-time about sensors. how can I display 'full log' (debug) as soon as the drone launches?

Thanks in advance!
Posts: 700
Joined: Fri Jul 06, 2018 11:13 am

Re: Debug tool

Post by kimberly »

Yes you can!

You can use

Code: Select all

if you put

Code: Select all

 #include "debug.h"
on top of your script. This can be used in the same way as with printf (so with the variables at the end and %d %f etc) and you can see the messages in the console tab. Just be aware that there is a limit of how many debug messages you can send in one go before overloading the message queu's.

Also you can flash the crazyflie in debugmode (see here how to do it, but is not necessary for debug print I think). This will show more debug messages but be aware that it also removes the watchdog which provides extra runtime security. But since you are debugging anyway it should be fine (just be careful while flying)
Post Reply