Skip to content

Debugging

Jeffrey Shen edited this page Aug 2, 2017 · 7 revisions

This library provides functionality to make debugging your code easier. Simply enable specific debugging modes when you want to receive detailed output, and disable it otherwise.

Usage

Enable debugging by writing #define DEBUG 1 within your config.c (1 being on, and 0 being off). This enables all debugging outputs.

If you want more fine control over what you want to be outputting, you can also write #define DEBUG_A_SPECIFIC_OPTION 1. By default, all options are 0. Current options include:

  • DEBUG_FPS: If enabled, this will regularly print out the x, y, and rotation value.
  • DEBUG_REMOTE: If enabled, this will print whenever a PR button is pressed and released, and when it is long held. It will also print whenever the bailout button is pressed.
  • DEBUG_SENSORS: If enabled, this will print a sensor's value and speed whenever it is updated.
  • DEBUG_SLEW: If enabled, this will print the value and the requested value of each motor.
  • DEBUG_WHEEL

However, if DEBUG is enabled, all debugs will go off regardless of whether the individual options are disabled.

Clone this wiki locally