Browse Source

AP_InertialSensor: fix timing debug macro

- Use "INS_" prefix for the name in order to limit the scope for that macro.

- Don't define it in the code and check if it is defined instead of checking
  the value. With that, there's no need to touch the code for enabling debug,
  only a reconfiguration is necessary (e.g., `CXXFLAGS='-DINS_TIMING_DEBUG' waf
  configure ...`).
mission-4.1.18
Gustavo Jose de Sousa 9 years ago committed by Lucas De Marchi
parent
commit
69405cc99a
  1. 10
      libraries/AP_InertialSensor/AP_InertialSensor.cpp

10
libraries/AP_InertialSensor/AP_InertialSensor.cpp

@ -23,13 +23,9 @@ @@ -23,13 +23,9 @@
#include "AP_InertialSensor_SITL.h"
#include "AP_InertialSensor_qflight.h"
/*
enable TIMING_DEBUG to track down scheduling issues with the main
loop. Output is on the debug console
*/
#define TIMING_DEBUG 0
#if TIMING_DEBUG
/* Define INS_TIMING_DEBUG to track down scheduling issues with the main loop.
* Output is on the debug console. */
#ifdef INS_TIMING_DEBUG
#include <stdio.h>
#define timing_printf(fmt, args...) do { printf("[timing] " fmt, ##args); } while(0)
#else

Loading…
Cancel
Save