Hi,
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!
Debug tool
Re: Debug tool
Yes you can!
You can use if you put 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)
You can use
Code: Select all
DEBUG_PRINT("hello\n");
Code: Select all
#include "debug.h"
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)