mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 01:18:29 -04:00
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:
parent
cfb3124f2c
commit
69405cc99a
@ -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…
Reference in New Issue
Block a user