mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +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:
parent
009f528266
commit
faae76e3c7
@ -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
|
||||
|
||||
3
src/platforms/posix/include/px4_platform_types.h
Normal file
3
src/platforms/posix/include/px4_platform_types.h
Normal file
@ -0,0 +1,3 @@
|
||||
#ifdef __PX4_QURT
|
||||
#include <dspal_types.h>
|
||||
#endif
|
||||
@ -41,14 +41,11 @@
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/wqueue.h>
|
||||
#include <nuttx/clock.h>
|
||||
#elif defined(__PX4_POSIX) || defined(__PX4_QURT)
|
||||
#elif defined(__PX4_POSIX)
|
||||
|
||||
#include <stdint.h>
|
||||
#include <queue.h>
|
||||
|
||||
#ifdef __PX4_QURT
|
||||
#include <dspal_types.h>
|
||||
#endif
|
||||
#include <px4_platform_types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user