From b03818cd0e49009f795c010f9faf27ffde77311c Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Fri, 2 Jun 2017 20:23:50 -0400 Subject: [PATCH] controllib move old blocks to segway --- src/examples/segway/BlockSegwayController.hpp | 2 +- src/examples/segway/CMakeLists.txt | 1 + .../uorb => examples/segway}/blocks.cpp | 0 .../uorb => examples/segway}/blocks.hpp | 0 src/lib/controllib/CMakeLists.txt | 1 - .../controllib_test/controllib_test_main.cpp | 27 +++---------------- src/modules/ekf2/ekf2_main.cpp | 2 +- 7 files changed, 6 insertions(+), 27 deletions(-) rename src/{lib/controllib/uorb => examples/segway}/blocks.cpp (100%) rename src/{lib/controllib/uorb => examples/segway}/blocks.hpp (100%) diff --git a/src/examples/segway/BlockSegwayController.hpp b/src/examples/segway/BlockSegwayController.hpp index f160bfb216..f0bd874ce6 100644 --- a/src/examples/segway/BlockSegwayController.hpp +++ b/src/examples/segway/BlockSegwayController.hpp @@ -2,7 +2,7 @@ #include #include -#include +#include "blocks.hpp" using control::BlockPI; using control::BlockP; diff --git a/src/examples/segway/CMakeLists.txt b/src/examples/segway/CMakeLists.txt index 29d6779e7c..574eb68628 100644 --- a/src/examples/segway/CMakeLists.txt +++ b/src/examples/segway/CMakeLists.txt @@ -36,6 +36,7 @@ px4_add_module( STACK_MAIN 1300 STACK_MAX 1300 SRCS + blocks.cpp segway_main.cpp BlockSegwayController.cpp params.c diff --git a/src/lib/controllib/uorb/blocks.cpp b/src/examples/segway/blocks.cpp similarity index 100% rename from src/lib/controllib/uorb/blocks.cpp rename to src/examples/segway/blocks.cpp diff --git a/src/lib/controllib/uorb/blocks.hpp b/src/examples/segway/blocks.hpp similarity index 100% rename from src/lib/controllib/uorb/blocks.hpp rename to src/examples/segway/blocks.hpp diff --git a/src/lib/controllib/CMakeLists.txt b/src/lib/controllib/CMakeLists.txt index 74fb84aa93..9d37781032 100644 --- a/src/lib/controllib/CMakeLists.txt +++ b/src/lib/controllib/CMakeLists.txt @@ -37,7 +37,6 @@ px4_add_module( blocks.cpp block/Block.cpp block/BlockParam.cpp - uorb/blocks.cpp DEPENDS platforms__common ) diff --git a/src/lib/controllib/controllib_test/controllib_test_main.cpp b/src/lib/controllib/controllib_test/controllib_test_main.cpp index 15549a16f2..cbe816a76e 100644 --- a/src/lib/controllib/controllib_test/controllib_test_main.cpp +++ b/src/lib/controllib/controllib_test/controllib_test_main.cpp @@ -83,9 +83,8 @@ int basicBlocksTest() failed = failed || blockPDTest() < 0; failed = failed || blockPIDTest() < 0; failed = failed || blockOutputTest() < 0; - // known failures - //failed = failed || blockRandUniformTest() < 0; - //failed = failed || blockRandGaussTest() < 0; + failed = failed || blockRandUniformTest() < 0; + failed = failed || blockRandGaussTest() < 0; failed = failed || blockStatsTest() < 0; failed = failed || blockDelayTest() < 0; return failed ? -1 : 0; @@ -532,25 +531,5 @@ extern "C" __EXPORT int controllib_test_main(int argc, char *argv[]); int controllib_test_main(int argc, char *argv[]) { - (void)argc; - (void)argv; - blockLimitTest(); - blockLimitSymTest(); - blockLowPassTest(); - blockHighPassTest(); - blockLowPass2Test(); - blockIntegralTest(); - blockIntegralTrapTest(); - blockDerivativeTest(); - blockPTest(); - blockPITest(); - blockPDTest(); - blockPIDTest(); - blockOutputTest(); - //blockRandUniformTest(); - // known failures - // blockRandGaussTest(); - blockStatsTest(); - blockDelayTest(); - return 0; + return basicBlocksTest(); } diff --git a/src/modules/ekf2/ekf2_main.cpp b/src/modules/ekf2/ekf2_main.cpp index e100f71348..8f6c36e098 100644 --- a/src/modules/ekf2/ekf2_main.cpp +++ b/src/modules/ekf2/ekf2_main.cpp @@ -62,7 +62,7 @@ #include #include #include -#include +#include #include #include