diff --git a/src/examples/fixedwing_control/main.cpp b/src/examples/fixedwing_control/main.cpp index 8f26da4be5..628b201c6c 100644 --- a/src/examples/fixedwing_control/main.cpp +++ b/src/examples/fixedwing_control/main.cpp @@ -54,7 +54,6 @@ #include #include #include -#include #include #include #include diff --git a/src/examples/rover_steering_control/main.cpp b/src/examples/rover_steering_control/main.cpp index b5568e2ae3..0afe0fc75d 100644 --- a/src/examples/rover_steering_control/main.cpp +++ b/src/examples/rover_steering_control/main.cpp @@ -62,7 +62,6 @@ #include #include #include -#include #include #include #include diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index 1a3ed5ff16..e07addaf4c 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -45,6 +45,7 @@ add_subdirectory(led) add_subdirectory(mathlib) add_subdirectory(mixer) add_subdirectory(perf) +add_subdirectory(pid) add_subdirectory(pwm_limit) add_subdirectory(rc) add_subdirectory(terrain_estimation) diff --git a/src/lib/pid/CMakeLists.txt b/src/lib/pid/CMakeLists.txt new file mode 100644 index 0000000000..88af32e3d4 --- /dev/null +++ b/src/lib/pid/CMakeLists.txt @@ -0,0 +1,34 @@ +############################################################################ +# +# Copyright (c) 2018 PX4 Development Team. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name PX4 nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +px4_add_library(pid pid.c) diff --git a/src/modules/systemlib/pid/pid.c b/src/lib/pid/pid.c similarity index 100% rename from src/modules/systemlib/pid/pid.c rename to src/lib/pid/pid.c diff --git a/src/modules/systemlib/pid/pid.h b/src/lib/pid/pid.h similarity index 100% rename from src/modules/systemlib/pid/pid.h rename to src/lib/pid/pid.h diff --git a/src/modules/gnd_att_control/GroundRoverAttitudeControl.hpp b/src/modules/gnd_att_control/GroundRoverAttitudeControl.hpp index 017e9ccc1b..bb11a36f8d 100644 --- a/src/modules/gnd_att_control/GroundRoverAttitudeControl.hpp +++ b/src/modules/gnd_att_control/GroundRoverAttitudeControl.hpp @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/modules/gnd_pos_control/CMakeLists.txt b/src/modules/gnd_pos_control/CMakeLists.txt index 7e5afec80d..1c52a1be87 100644 --- a/src/modules/gnd_pos_control/CMakeLists.txt +++ b/src/modules/gnd_pos_control/CMakeLists.txt @@ -38,4 +38,5 @@ px4_add_module( DEPENDS git_ecl ecl_l1 + pid ) diff --git a/src/modules/gnd_pos_control/GroundRoverPositionControl.hpp b/src/modules/gnd_pos_control/GroundRoverPositionControl.hpp index 2badf66f94..cbbfdcc913 100644 --- a/src/modules/gnd_pos_control/GroundRoverPositionControl.hpp +++ b/src/modules/gnd_pos_control/GroundRoverPositionControl.hpp @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/modules/systemlib/CMakeLists.txt b/src/modules/systemlib/CMakeLists.txt index 68ba78bfde..bdcde3b89c 100644 --- a/src/modules/systemlib/CMakeLists.txt +++ b/src/modules/systemlib/CMakeLists.txt @@ -39,7 +39,6 @@ set(SRCS hysteresis/hysteresis.cpp mavlink_log.c otp.c - pid/pid.c ) if(${OS} STREQUAL "nuttx")