Add Paparazzi compatibility (#580)

This adds support for the paparazzi autopilot to use this library as EKF.
The header order change has to be done in order to have std.h included to get certain defines at the start of the estimator_interface.h.
This commit is contained in:
Freek van Tienen 2019-03-05 18:41:21 +01:00 committed by Daniel Agar
parent 5cd331055f
commit 78b899c72d
2 changed files with 14 additions and 1 deletions

View File

@ -41,10 +41,10 @@
#pragma once
#include <ecl.h>
#include "common.h"
#include "RingBuffer.h"
#include <ecl.h>
#include <geo/geo.h>
#include <matrix/math.hpp>
#include <mathlib/mathlib.h>

13
ecl.h
View File

@ -51,6 +51,19 @@ using ecl_abstime = hrt_abstime;
#define ECL_WARN PX4_WARN
#define ECL_ERR PX4_ERR
#elif defined(__PAPARAZZI)
#include "std.h"
#define ecl_absolute_time() (0)
#define ecl_elapsed_time(t) (*t * 0UL) // TODO: add simple time functions
using ecl_abstime = uint64_t;
#define ECL_INFO(...)
#define ECL_WARN(...)
#define ECL_ERR(...)
#else
#include <cstdio>