mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-26 11:00:35 +08:00
Removed __PX4_QURT ifdefs from application layer
Replaced test for __PX4_QURT with test for NAV_DEBUG. Optimized implementation to remove code when flag is not set. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -185,12 +185,11 @@ int position_estimator_inav_main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef INAV_DEBUG
|
||||
static void write_debug_log(const char *msg, float dt, float x_est[2], float y_est[2], float z_est[2], float x_est_prev[2], float y_est_prev[2], float z_est_prev[2],
|
||||
float acc[3], float corr_gps[3][2], float w_xy_gps_p, float w_xy_gps_v, float corr_mocap[3][1], float w_mocap_p,
|
||||
float corr_vision[3][2], float w_xy_vision_p, float w_z_vision_p, float w_xy_vision_v)
|
||||
{
|
||||
return;
|
||||
#ifndef __PX4_QURT
|
||||
FILE *f = fopen(PX4_ROOTFSDIR"/fs/microsd/inav.log", "a");
|
||||
|
||||
if (f) {
|
||||
@@ -214,8 +213,10 @@ static void write_debug_log(const char *msg, float dt, float x_est[2], float y_e
|
||||
|
||||
fsync(fileno(f));
|
||||
fclose(f);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#define write_debug_log(...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* main
|
||||
|
||||
Reference in New Issue
Block a user