diff --git a/EKF/swig/python/CMakeLists.txt b/EKF/swig/python/CMakeLists.txt index 1845060343..e6319f5b31 100644 --- a/EKF/swig/python/CMakeLists.txt +++ b/EKF/swig/python/CMakeLists.txt @@ -14,7 +14,10 @@ set_source_files_properties(../ecl_EKF.i PROPERTIES CPLUSPLUS ON) include_directories(../..) # Add swig module -swig_add_module(ecl_EKF python ../ecl_EKF.i) +swig_add_library(ecl_EKF + LANGUAGE python + SOURCES ../ecl_EKF.i +) swig_link_libraries(ecl_EKF ecl_EKF ${PYTHON_LIBRARIES}) # Files to install with Python diff --git a/EKF/tests/pytest/test_altitude.py b/EKF/tests/pytest/test_altitude.py index c32826602f..c7393c2a65 100644 --- a/EKF/tests/pytest/test_altitude.py +++ b/EKF/tests/pytest/test_altitude.py @@ -133,13 +133,13 @@ def test_converges_to_baro_altitude(altitude): Increase the altitude with a bang-bang acceleration profile to target altitude, then wait there for a while and make sure it converges """ - # Due to hypothesis not interacting with pytest, cannot use fixture here - ekf, time_usec = initialized_ekf() + ekf = ecl_EKF.Ekf() + time_usec = 1000 dt_usec = ecl_EKF.Ekf.FILTER_UPDATE_PERIOD_MS * 1000 - # No samples, half are used for ramping up / down to the altitude - n_samples = 200 + # Run for a while + n_samples = 10000 # Compute smooth acceleration profile rampup_accel = altitude / (((n_samples // 2 // 2) * (dt_usec / 1e6))**2) diff --git a/Jenkinsfile b/Jenkinsfile index c5f331d8f6..7308c2712a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,7 +7,7 @@ pipeline { stage('Linux GCC') { agent { docker { - image 'px4io/px4-dev-base:2019-01-28' + image 'px4io/px4-dev-base:2019-01-31' args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw' } } @@ -27,7 +27,7 @@ pipeline { stage('Linux Clang') { agent { docker { - image 'px4io/px4-dev-clang:2019-01-28' + image 'px4io/px4-dev-clang:2019-01-31' args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw' } } @@ -74,7 +74,7 @@ pipeline { stage('coverage') { agent { docker { - image 'px4io/px4-dev-ecl:2019-01-28' + image 'px4io/px4-dev-ecl:2019-01-31' args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw' } } @@ -105,7 +105,7 @@ pipeline { stage('EKF pytest') { agent { docker { - image 'px4io/px4-dev-ecl:2019-01-28' + image 'px4io/px4-dev-ecl:2019-01-31' args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw' } } @@ -123,7 +123,7 @@ pipeline { stage('test') { agent { docker { - image 'px4io/px4-dev-ecl:2019-01-28' + image 'px4io/px4-dev-ecl:2019-01-31' args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw' } } @@ -137,27 +137,10 @@ pipeline { } } - stage('test (asan)') { - agent { - docker { - image 'px4io/px4-dev-ecl:2019-01-28' - args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw' - } - } - steps { - sh 'export' - sh 'ccache -z' - sh 'make distclean' - sh 'make test_asan' - sh 'ccache -s' - sh 'make distclean' - } - } - stage('doxygen') { agent { docker { - image 'px4io/px4-dev-base:2019-01-28' + image 'px4io/px4-dev-base:2019-01-31' args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw' } } @@ -183,7 +166,7 @@ pipeline { stage('PX4/Firmware build') { agent { docker { - image 'px4io/px4-dev-base:2019-01-28' + image 'px4io/px4-dev-base:2019-01-31' args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw' } } diff --git a/ecl.h b/ecl.h index fe2b921753..1984fac8be 100644 --- a/ecl.h +++ b/ecl.h @@ -67,19 +67,5 @@ using ecl_abstime = uint64_t; #endif /* PX4_POSIX || PX4_NUTTX */ - -#if defined(__PX4_QURT) - -// Missing math.h defines -#define ISFINITE(x) __builtin_isfinite(x) - -#else /* !QuRT */ - #include -#if defined(__cplusplus) && !defined(__PX4_NUTTX) -#define ISFINITE(x) std::isfinite(x) -#else -#define ISFINITE(x) isfinite(x) -#endif - -#endif +#define ISFINITE(x) __builtin_isfinite(x)