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 ...`).
This commit is contained in:
Gustavo Jose de Sousa 2016-07-21 16:54:37 -03:00 committed by Lucas De Marchi
parent cfb3124f2c
commit 69405cc99a

View File

@ -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