User Tools

Site Tools


projects:crazyflie:pc_utils:debugdriver

This page has deprecated and will be archived. Please go to https://www.bitcraze.io/.

Client-side debugging

The client-side debugging feature is used mainly to debug the UI on the client side without having a Crazyflie connected.

To accomplish this there's two ways to debug: During connection and after the connection is established. Debugging during the connection is managed by using multiple interfaces, one for each simulated behavior and debugging after the connection is established is managed by sending data to a designated port.

To enable the DebugDriver interface you will have to edit the configuration file (config.json) and set the enable_debug_driver attribute to true.

Debugging during connection

To manage debugging during the connection setup multiple interfaces are used, one for each simulated behavior. Currently the following behaviors are supported when scanning interfaces:

debug://0/0 - Normal function (successful connect)
debug://0/1 - Don't answer ping on connection (will fail connection with error)
debug://0/2 - Send incomplete TOC of loggable variables

Debugging after connection is established

Once the connection is established the debugging functionality is handled by sending messages to port 14 which will be handled in the DebugDriver and generate the desired behavior. The DebugDriver features are found in the DebugDriver Toolbox.

Channel 0

Channel 0 is used for commands that requires only one command byte and a number of optional data bytes.

Function Command Nbr of data bytes Data
Set link quality 0 1 Link quality 0-100%
Force disconnect 1 0 N/A
Generate garbage data 2 0 N/A
Enable/disable auto generated variable data 3 Not fixed First byte is TRUE/FALSE followed by zero-terminated group-name and var-name
Set variable data 4 Not fixed Zero-terminated group-name and var-name followed by data
projects/crazyflie/pc_utils/debugdriver.txt · Last modified: 2021-06-24 16:52 by kimberly