From b68fd5e0a770791b3dfbbc9d9ff97140a00df4ee Mon Sep 17 00:00:00 2001 From: ChristophTobler Date: Thu, 26 Jul 2018 09:24:26 +0200 Subject: [PATCH] Flight Tasks: CMake/folder restructure (no code change) put flight tasks in separate folder and create a lib for each goal is to select tasks for targets (e.g. because of flash issue) --- src/lib/FlightTasks/CMakeLists.txt | 36 ++++++------- src/lib/FlightTasks/FlightTasks.hpp | 22 ++++---- src/lib/FlightTasks/tasks/Auto/CMakeLists.txt | 39 +++++++++++++++ .../tasks/{ => Auto}/FlightTaskAuto.cpp | 0 .../tasks/{ => Auto}/FlightTaskAuto.hpp | 0 .../tasks/AutoFollowMe/CMakeLists.txt | 39 +++++++++++++++ .../FlightTaskAutoFollowMe.cpp | 0 .../FlightTaskAutoFollowMe.hpp | 0 .../FlightTasks/tasks/AutoLine/CMakeLists.txt | 39 +++++++++++++++ .../{ => AutoLine}/FlightTaskAutoLine.cpp | 0 .../{ => AutoLine}/FlightTaskAutoLine.hpp | 0 src/lib/FlightTasks/tasks/CMakeLists.txt | 50 +++++++++++++++++++ src/lib/FlightTasks/tasks/FlightTask.hpp | 2 +- .../FlightTasks/tasks/Manual/CMakeLists.txt | 39 +++++++++++++++ .../tasks/{ => Manual}/FlightTaskManual.cpp | 0 .../tasks/{ => Manual}/FlightTaskManual.hpp | 0 .../tasks/ManualAltitude/CMakeLists.txt | 39 +++++++++++++++ .../FlightTaskManualAltitude.cpp | 0 .../FlightTaskManualAltitude.hpp | 0 .../tasks/ManualAltitudeSmooth/CMakeLists.txt | 39 +++++++++++++++ .../FlightTaskManualAltitudeSmooth.cpp | 0 .../FlightTaskManualAltitudeSmooth.hpp | 0 .../tasks/ManualPosition/CMakeLists.txt | 39 +++++++++++++++ .../FlightTaskManualPosition.cpp | 0 .../FlightTaskManualPosition.hpp | 0 .../tasks/ManualPositionSmooth/CMakeLists.txt | 39 +++++++++++++++ .../FlightTaskManualPositionSmooth.cpp | 0 .../FlightTaskManualPositionSmooth.hpp | 0 .../tasks/ManualStabilized/CMakeLists.txt | 39 +++++++++++++++ .../FlightTaskManualStabilized.cpp | 0 .../FlightTaskManualStabilized.hpp | 0 .../FlightTasks/tasks/Offboard/CMakeLists.txt | 39 +++++++++++++++ .../{ => Offboard}/FlightTaskOffboard.cpp | 0 .../{ => Offboard}/FlightTaskOffboard.hpp | 0 .../FlightTasks/tasks/Orbit/CMakeLists.txt | 39 +++++++++++++++ .../tasks/{ => Orbit}/FlightTaskOrbit.cpp | 0 .../tasks/{ => Orbit}/FlightTaskOrbit.hpp | 0 .../tasks/{ => Sport}/FlightTaskSport.hpp | 0 .../{ => tasks}/SubscriptionArray.cpp | 0 .../{ => tasks}/SubscriptionArray.hpp | 0 .../FlightTasks/tasks/Utility/CMakeLists.txt | 41 +++++++++++++++ 41 files changed, 550 insertions(+), 30 deletions(-) create mode 100644 src/lib/FlightTasks/tasks/Auto/CMakeLists.txt rename src/lib/FlightTasks/tasks/{ => Auto}/FlightTaskAuto.cpp (100%) rename src/lib/FlightTasks/tasks/{ => Auto}/FlightTaskAuto.hpp (100%) create mode 100644 src/lib/FlightTasks/tasks/AutoFollowMe/CMakeLists.txt rename src/lib/FlightTasks/tasks/{ => AutoFollowMe}/FlightTaskAutoFollowMe.cpp (100%) rename src/lib/FlightTasks/tasks/{ => AutoFollowMe}/FlightTaskAutoFollowMe.hpp (100%) create mode 100644 src/lib/FlightTasks/tasks/AutoLine/CMakeLists.txt rename src/lib/FlightTasks/tasks/{ => AutoLine}/FlightTaskAutoLine.cpp (100%) rename src/lib/FlightTasks/tasks/{ => AutoLine}/FlightTaskAutoLine.hpp (100%) create mode 100644 src/lib/FlightTasks/tasks/CMakeLists.txt create mode 100644 src/lib/FlightTasks/tasks/Manual/CMakeLists.txt rename src/lib/FlightTasks/tasks/{ => Manual}/FlightTaskManual.cpp (100%) rename src/lib/FlightTasks/tasks/{ => Manual}/FlightTaskManual.hpp (100%) create mode 100644 src/lib/FlightTasks/tasks/ManualAltitude/CMakeLists.txt rename src/lib/FlightTasks/tasks/{ => ManualAltitude}/FlightTaskManualAltitude.cpp (100%) rename src/lib/FlightTasks/tasks/{ => ManualAltitude}/FlightTaskManualAltitude.hpp (100%) create mode 100644 src/lib/FlightTasks/tasks/ManualAltitudeSmooth/CMakeLists.txt rename src/lib/FlightTasks/tasks/{ => ManualAltitudeSmooth}/FlightTaskManualAltitudeSmooth.cpp (100%) rename src/lib/FlightTasks/tasks/{ => ManualAltitudeSmooth}/FlightTaskManualAltitudeSmooth.hpp (100%) create mode 100644 src/lib/FlightTasks/tasks/ManualPosition/CMakeLists.txt rename src/lib/FlightTasks/tasks/{ => ManualPosition}/FlightTaskManualPosition.cpp (100%) rename src/lib/FlightTasks/tasks/{ => ManualPosition}/FlightTaskManualPosition.hpp (100%) create mode 100644 src/lib/FlightTasks/tasks/ManualPositionSmooth/CMakeLists.txt rename src/lib/FlightTasks/tasks/{ => ManualPositionSmooth}/FlightTaskManualPositionSmooth.cpp (100%) rename src/lib/FlightTasks/tasks/{ => ManualPositionSmooth}/FlightTaskManualPositionSmooth.hpp (100%) create mode 100644 src/lib/FlightTasks/tasks/ManualStabilized/CMakeLists.txt rename src/lib/FlightTasks/tasks/{ => ManualStabilized}/FlightTaskManualStabilized.cpp (100%) rename src/lib/FlightTasks/tasks/{ => ManualStabilized}/FlightTaskManualStabilized.hpp (100%) create mode 100644 src/lib/FlightTasks/tasks/Offboard/CMakeLists.txt rename src/lib/FlightTasks/tasks/{ => Offboard}/FlightTaskOffboard.cpp (100%) rename src/lib/FlightTasks/tasks/{ => Offboard}/FlightTaskOffboard.hpp (100%) create mode 100644 src/lib/FlightTasks/tasks/Orbit/CMakeLists.txt rename src/lib/FlightTasks/tasks/{ => Orbit}/FlightTaskOrbit.cpp (100%) rename src/lib/FlightTasks/tasks/{ => Orbit}/FlightTaskOrbit.hpp (100%) rename src/lib/FlightTasks/tasks/{ => Sport}/FlightTaskSport.hpp (100%) rename src/lib/FlightTasks/{ => tasks}/SubscriptionArray.cpp (100%) rename src/lib/FlightTasks/{ => tasks}/SubscriptionArray.hpp (100%) create mode 100644 src/lib/FlightTasks/tasks/Utility/CMakeLists.txt diff --git a/src/lib/FlightTasks/CMakeLists.txt b/src/lib/FlightTasks/CMakeLists.txt index d2adfaecb3..bcc1446793 100644 --- a/src/lib/FlightTasks/CMakeLists.txt +++ b/src/lib/FlightTasks/CMakeLists.txt @@ -32,22 +32,22 @@ ############################################################################ px4_add_library(flight_tasks -tasks/FlightTask.cpp - tasks/FlightTaskManual.cpp - tasks/FlightTaskManualStabilized.cpp - tasks/FlightTaskOrbit.cpp - tasks/FlightTaskManualAltitude.cpp - tasks/FlightTaskManualAltitudeSmooth.cpp - tasks/FlightTaskManualPosition.cpp - tasks/FlightTaskManualPositionSmooth.cpp - tasks/FlightTaskAuto.cpp - tasks/FlightTaskAutoLine.cpp - tasks/FlightTaskAutoMapper.cpp - tasks/FlightTaskAutoFollowMe.cpp - tasks/FlightTaskOffboard.cpp - tasks/Utility/ManualSmoothingZ.cpp - tasks/Utility/ManualSmoothingXY.cpp - tasks/Utility/StraightLine.cpp - SubscriptionArray.cpp - FlightTasks.cpp + FlightTasks.cpp ) + +target_link_libraries(flight_tasks PUBLIC + flight_tasks_manual + flight_tasks_manual_altitude + flight_tasks_manual_altitude_smooth + flight_tasks_manual_stabilized + flight_tasks_manual_position + flight_tasks_manual_position_smooth + flight_tasks_auto + flight_tasks_auto_line + flight_tasks_auto_follow_me + flight_tasks_offboard + flight_tasks_orbit + flight_tasks_utility +) + +add_subdirectory(tasks) diff --git a/src/lib/FlightTasks/FlightTasks.hpp b/src/lib/FlightTasks/FlightTasks.hpp index b2e13185d0..a59704f678 100644 --- a/src/lib/FlightTasks/FlightTasks.hpp +++ b/src/lib/FlightTasks/FlightTasks.hpp @@ -41,17 +41,17 @@ #pragma once -#include "tasks/FlightTask.hpp" -#include "tasks/FlightTaskManualAltitude.hpp" -#include "tasks/FlightTaskManualAltitudeSmooth.hpp" -#include "tasks/FlightTaskManualPosition.hpp" -#include "tasks/FlightTaskManualPositionSmooth.hpp" -#include "tasks/FlightTaskManualStabilized.hpp" -#include "tasks/FlightTaskAutoLine.hpp" -#include "tasks/FlightTaskAutoFollowMe.hpp" -#include "tasks/FlightTaskOrbit.hpp" -#include "tasks/FlightTaskSport.hpp" -#include "tasks/FlightTaskOffboard.hpp" +#include "FlightTask.hpp" +#include "FlightTaskManualAltitude.hpp" +#include "FlightTaskManualAltitudeSmooth.hpp" +#include "FlightTaskManualPosition.hpp" +#include "FlightTaskManualPositionSmooth.hpp" +#include "FlightTaskManualStabilized.hpp" +#include "FlightTaskAutoLine.hpp" +#include "FlightTaskAutoFollowMe.hpp" +#include "FlightTaskOrbit.hpp" +#include "tasks/Sport/FlightTaskSport.hpp" +#include "FlightTaskOffboard.hpp" #include "SubscriptionArray.hpp" diff --git a/src/lib/FlightTasks/tasks/Auto/CMakeLists.txt b/src/lib/FlightTasks/tasks/Auto/CMakeLists.txt new file mode 100644 index 0000000000..8e87379b60 --- /dev/null +++ b/src/lib/FlightTasks/tasks/Auto/CMakeLists.txt @@ -0,0 +1,39 @@ +############################################################################ +# +# 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(flight_tasks_auto + FlightTaskAuto.cpp +) + +target_link_libraries(flight_tasks_auto PUBLIC flight_task) +target_include_directories(flight_tasks_auto PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ../) diff --git a/src/lib/FlightTasks/tasks/FlightTaskAuto.cpp b/src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.cpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskAuto.cpp rename to src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.cpp diff --git a/src/lib/FlightTasks/tasks/FlightTaskAuto.hpp b/src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.hpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskAuto.hpp rename to src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.hpp diff --git a/src/lib/FlightTasks/tasks/AutoFollowMe/CMakeLists.txt b/src/lib/FlightTasks/tasks/AutoFollowMe/CMakeLists.txt new file mode 100644 index 0000000000..e0b9c9fca4 --- /dev/null +++ b/src/lib/FlightTasks/tasks/AutoFollowMe/CMakeLists.txt @@ -0,0 +1,39 @@ +############################################################################ +# +# 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(flight_tasks_auto_follow_me + FlightTaskAutoFollowMe.cpp +) + +target_link_libraries(flight_tasks_auto_follow_me PUBLIC flight_tasks_auto) +target_include_directories(flight_tasks_auto_follow_me PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/lib/FlightTasks/tasks/FlightTaskAutoFollowMe.cpp b/src/lib/FlightTasks/tasks/AutoFollowMe/FlightTaskAutoFollowMe.cpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskAutoFollowMe.cpp rename to src/lib/FlightTasks/tasks/AutoFollowMe/FlightTaskAutoFollowMe.cpp diff --git a/src/lib/FlightTasks/tasks/FlightTaskAutoFollowMe.hpp b/src/lib/FlightTasks/tasks/AutoFollowMe/FlightTaskAutoFollowMe.hpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskAutoFollowMe.hpp rename to src/lib/FlightTasks/tasks/AutoFollowMe/FlightTaskAutoFollowMe.hpp diff --git a/src/lib/FlightTasks/tasks/AutoLine/CMakeLists.txt b/src/lib/FlightTasks/tasks/AutoLine/CMakeLists.txt new file mode 100644 index 0000000000..5d0f880bea --- /dev/null +++ b/src/lib/FlightTasks/tasks/AutoLine/CMakeLists.txt @@ -0,0 +1,39 @@ +############################################################################ +# +# 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(flight_tasks_auto_line + FlightTaskAutoLine.cpp +) + +target_link_libraries(flight_tasks_auto_line PUBLIC flight_tasks_auto) +target_include_directories(flight_tasks_auto_line PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/lib/FlightTasks/tasks/FlightTaskAutoLine.cpp b/src/lib/FlightTasks/tasks/AutoLine/FlightTaskAutoLine.cpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskAutoLine.cpp rename to src/lib/FlightTasks/tasks/AutoLine/FlightTaskAutoLine.cpp diff --git a/src/lib/FlightTasks/tasks/FlightTaskAutoLine.hpp b/src/lib/FlightTasks/tasks/AutoLine/FlightTaskAutoLine.hpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskAutoLine.hpp rename to src/lib/FlightTasks/tasks/AutoLine/FlightTaskAutoLine.hpp diff --git a/src/lib/FlightTasks/tasks/CMakeLists.txt b/src/lib/FlightTasks/tasks/CMakeLists.txt new file mode 100644 index 0000000000..4e60ac0b4d --- /dev/null +++ b/src/lib/FlightTasks/tasks/CMakeLists.txt @@ -0,0 +1,50 @@ +############################################################################ +# +# 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(flight_task + FlightTask.cpp + SubscriptionArray.cpp +) + +add_subdirectory(Utility) +add_subdirectory(Manual) +add_subdirectory(ManualAltitude) +add_subdirectory(ManualAltitudeSmooth) +add_subdirectory(ManualPosition) +add_subdirectory(ManualPositionSmooth) +add_subdirectory(ManualStabilized) +add_subdirectory(Auto) +add_subdirectory(AutoLine) +add_subdirectory(AutoFollowMe) +add_subdirectory(Offboard) +add_subdirectory(Orbit) \ No newline at end of file diff --git a/src/lib/FlightTasks/tasks/FlightTask.hpp b/src/lib/FlightTasks/tasks/FlightTask.hpp index 2dec30bdd2..9ac6e1ce7f 100644 --- a/src/lib/FlightTasks/tasks/FlightTask.hpp +++ b/src/lib/FlightTasks/tasks/FlightTask.hpp @@ -50,7 +50,7 @@ #include #include #include -#include "../SubscriptionArray.hpp" +#include "SubscriptionArray.hpp" class FlightTask : public ModuleParams { diff --git a/src/lib/FlightTasks/tasks/Manual/CMakeLists.txt b/src/lib/FlightTasks/tasks/Manual/CMakeLists.txt new file mode 100644 index 0000000000..6fa3006106 --- /dev/null +++ b/src/lib/FlightTasks/tasks/Manual/CMakeLists.txt @@ -0,0 +1,39 @@ +############################################################################ +# +# 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(flight_tasks_manual + FlightTaskManual.cpp +) + +target_link_libraries(flight_tasks_manual PUBLIC flight_task) +target_include_directories(flight_tasks_manual PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ../) diff --git a/src/lib/FlightTasks/tasks/FlightTaskManual.cpp b/src/lib/FlightTasks/tasks/Manual/FlightTaskManual.cpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskManual.cpp rename to src/lib/FlightTasks/tasks/Manual/FlightTaskManual.cpp diff --git a/src/lib/FlightTasks/tasks/FlightTaskManual.hpp b/src/lib/FlightTasks/tasks/Manual/FlightTaskManual.hpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskManual.hpp rename to src/lib/FlightTasks/tasks/Manual/FlightTaskManual.hpp diff --git a/src/lib/FlightTasks/tasks/ManualAltitude/CMakeLists.txt b/src/lib/FlightTasks/tasks/ManualAltitude/CMakeLists.txt new file mode 100644 index 0000000000..833175e7f1 --- /dev/null +++ b/src/lib/FlightTasks/tasks/ManualAltitude/CMakeLists.txt @@ -0,0 +1,39 @@ +############################################################################ +# +# 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(flight_tasks_manual_altitude + FlightTaskManualAltitude.cpp +) + +target_link_libraries(flight_tasks_manual_altitude PUBLIC flight_tasks_manual_stabilized) +target_include_directories(flight_tasks_manual_altitude PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/lib/FlightTasks/tasks/FlightTaskManualAltitude.cpp b/src/lib/FlightTasks/tasks/ManualAltitude/FlightTaskManualAltitude.cpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskManualAltitude.cpp rename to src/lib/FlightTasks/tasks/ManualAltitude/FlightTaskManualAltitude.cpp diff --git a/src/lib/FlightTasks/tasks/FlightTaskManualAltitude.hpp b/src/lib/FlightTasks/tasks/ManualAltitude/FlightTaskManualAltitude.hpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskManualAltitude.hpp rename to src/lib/FlightTasks/tasks/ManualAltitude/FlightTaskManualAltitude.hpp diff --git a/src/lib/FlightTasks/tasks/ManualAltitudeSmooth/CMakeLists.txt b/src/lib/FlightTasks/tasks/ManualAltitudeSmooth/CMakeLists.txt new file mode 100644 index 0000000000..970afac440 --- /dev/null +++ b/src/lib/FlightTasks/tasks/ManualAltitudeSmooth/CMakeLists.txt @@ -0,0 +1,39 @@ +############################################################################ +# +# 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(flight_tasks_manual_altitude_smooth + FlightTaskManualAltitudeSmooth.cpp +) + +target_link_libraries(flight_tasks_manual_altitude_smooth PUBLIC flight_tasks_manual_altitude flight_tasks_utility) +target_include_directories(flight_tasks_manual_altitude_smooth PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/lib/FlightTasks/tasks/FlightTaskManualAltitudeSmooth.cpp b/src/lib/FlightTasks/tasks/ManualAltitudeSmooth/FlightTaskManualAltitudeSmooth.cpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskManualAltitudeSmooth.cpp rename to src/lib/FlightTasks/tasks/ManualAltitudeSmooth/FlightTaskManualAltitudeSmooth.cpp diff --git a/src/lib/FlightTasks/tasks/FlightTaskManualAltitudeSmooth.hpp b/src/lib/FlightTasks/tasks/ManualAltitudeSmooth/FlightTaskManualAltitudeSmooth.hpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskManualAltitudeSmooth.hpp rename to src/lib/FlightTasks/tasks/ManualAltitudeSmooth/FlightTaskManualAltitudeSmooth.hpp diff --git a/src/lib/FlightTasks/tasks/ManualPosition/CMakeLists.txt b/src/lib/FlightTasks/tasks/ManualPosition/CMakeLists.txt new file mode 100644 index 0000000000..0e6d062112 --- /dev/null +++ b/src/lib/FlightTasks/tasks/ManualPosition/CMakeLists.txt @@ -0,0 +1,39 @@ +############################################################################ +# +# 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(flight_tasks_manual_position + FlightTaskManualPosition.cpp +) + +target_link_libraries(flight_tasks_manual_position PUBLIC flight_tasks_manual_altitude) +target_include_directories(flight_tasks_manual_position PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/lib/FlightTasks/tasks/FlightTaskManualPosition.cpp b/src/lib/FlightTasks/tasks/ManualPosition/FlightTaskManualPosition.cpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskManualPosition.cpp rename to src/lib/FlightTasks/tasks/ManualPosition/FlightTaskManualPosition.cpp diff --git a/src/lib/FlightTasks/tasks/FlightTaskManualPosition.hpp b/src/lib/FlightTasks/tasks/ManualPosition/FlightTaskManualPosition.hpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskManualPosition.hpp rename to src/lib/FlightTasks/tasks/ManualPosition/FlightTaskManualPosition.hpp diff --git a/src/lib/FlightTasks/tasks/ManualPositionSmooth/CMakeLists.txt b/src/lib/FlightTasks/tasks/ManualPositionSmooth/CMakeLists.txt new file mode 100644 index 0000000000..a55ffab31f --- /dev/null +++ b/src/lib/FlightTasks/tasks/ManualPositionSmooth/CMakeLists.txt @@ -0,0 +1,39 @@ +############################################################################ +# +# 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(flight_tasks_manual_position_smooth + FlightTaskManualPositionSmooth.cpp +) + +target_link_libraries(flight_tasks_manual_position_smooth PUBLIC flight_tasks_manual_position flight_tasks_utility) +target_include_directories(flight_tasks_manual_position_smooth PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/lib/FlightTasks/tasks/FlightTaskManualPositionSmooth.cpp b/src/lib/FlightTasks/tasks/ManualPositionSmooth/FlightTaskManualPositionSmooth.cpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskManualPositionSmooth.cpp rename to src/lib/FlightTasks/tasks/ManualPositionSmooth/FlightTaskManualPositionSmooth.cpp diff --git a/src/lib/FlightTasks/tasks/FlightTaskManualPositionSmooth.hpp b/src/lib/FlightTasks/tasks/ManualPositionSmooth/FlightTaskManualPositionSmooth.hpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskManualPositionSmooth.hpp rename to src/lib/FlightTasks/tasks/ManualPositionSmooth/FlightTaskManualPositionSmooth.hpp diff --git a/src/lib/FlightTasks/tasks/ManualStabilized/CMakeLists.txt b/src/lib/FlightTasks/tasks/ManualStabilized/CMakeLists.txt new file mode 100644 index 0000000000..00b8259eff --- /dev/null +++ b/src/lib/FlightTasks/tasks/ManualStabilized/CMakeLists.txt @@ -0,0 +1,39 @@ +############################################################################ +# +# 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(flight_tasks_manual_stabilized + FlightTaskManualStabilized.cpp +) + +target_link_libraries(flight_tasks_manual_stabilized PUBLIC flight_tasks_manual) +target_include_directories(flight_tasks_manual_stabilized PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/lib/FlightTasks/tasks/FlightTaskManualStabilized.cpp b/src/lib/FlightTasks/tasks/ManualStabilized/FlightTaskManualStabilized.cpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskManualStabilized.cpp rename to src/lib/FlightTasks/tasks/ManualStabilized/FlightTaskManualStabilized.cpp diff --git a/src/lib/FlightTasks/tasks/FlightTaskManualStabilized.hpp b/src/lib/FlightTasks/tasks/ManualStabilized/FlightTaskManualStabilized.hpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskManualStabilized.hpp rename to src/lib/FlightTasks/tasks/ManualStabilized/FlightTaskManualStabilized.hpp diff --git a/src/lib/FlightTasks/tasks/Offboard/CMakeLists.txt b/src/lib/FlightTasks/tasks/Offboard/CMakeLists.txt new file mode 100644 index 0000000000..baf348220b --- /dev/null +++ b/src/lib/FlightTasks/tasks/Offboard/CMakeLists.txt @@ -0,0 +1,39 @@ +############################################################################ +# +# 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(flight_tasks_offboard + FlightTaskOffboard.cpp +) + +target_link_libraries(flight_tasks_offboard PUBLIC flight_task) +target_include_directories(flight_tasks_offboard PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ../) diff --git a/src/lib/FlightTasks/tasks/FlightTaskOffboard.cpp b/src/lib/FlightTasks/tasks/Offboard/FlightTaskOffboard.cpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskOffboard.cpp rename to src/lib/FlightTasks/tasks/Offboard/FlightTaskOffboard.cpp diff --git a/src/lib/FlightTasks/tasks/FlightTaskOffboard.hpp b/src/lib/FlightTasks/tasks/Offboard/FlightTaskOffboard.hpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskOffboard.hpp rename to src/lib/FlightTasks/tasks/Offboard/FlightTaskOffboard.hpp diff --git a/src/lib/FlightTasks/tasks/Orbit/CMakeLists.txt b/src/lib/FlightTasks/tasks/Orbit/CMakeLists.txt new file mode 100644 index 0000000000..78d9869b6e --- /dev/null +++ b/src/lib/FlightTasks/tasks/Orbit/CMakeLists.txt @@ -0,0 +1,39 @@ +############################################################################ +# +# 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(flight_tasks_orbit + FlightTaskOrbit.cpp +) + +target_link_libraries(flight_tasks_orbit PUBLIC flight_tasks_manual_altitude_smooth) +target_include_directories(flight_tasks_orbit PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/lib/FlightTasks/tasks/FlightTaskOrbit.cpp b/src/lib/FlightTasks/tasks/Orbit/FlightTaskOrbit.cpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskOrbit.cpp rename to src/lib/FlightTasks/tasks/Orbit/FlightTaskOrbit.cpp diff --git a/src/lib/FlightTasks/tasks/FlightTaskOrbit.hpp b/src/lib/FlightTasks/tasks/Orbit/FlightTaskOrbit.hpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskOrbit.hpp rename to src/lib/FlightTasks/tasks/Orbit/FlightTaskOrbit.hpp diff --git a/src/lib/FlightTasks/tasks/FlightTaskSport.hpp b/src/lib/FlightTasks/tasks/Sport/FlightTaskSport.hpp similarity index 100% rename from src/lib/FlightTasks/tasks/FlightTaskSport.hpp rename to src/lib/FlightTasks/tasks/Sport/FlightTaskSport.hpp diff --git a/src/lib/FlightTasks/SubscriptionArray.cpp b/src/lib/FlightTasks/tasks/SubscriptionArray.cpp similarity index 100% rename from src/lib/FlightTasks/SubscriptionArray.cpp rename to src/lib/FlightTasks/tasks/SubscriptionArray.cpp diff --git a/src/lib/FlightTasks/SubscriptionArray.hpp b/src/lib/FlightTasks/tasks/SubscriptionArray.hpp similarity index 100% rename from src/lib/FlightTasks/SubscriptionArray.hpp rename to src/lib/FlightTasks/tasks/SubscriptionArray.hpp diff --git a/src/lib/FlightTasks/tasks/Utility/CMakeLists.txt b/src/lib/FlightTasks/tasks/Utility/CMakeLists.txt new file mode 100644 index 0000000000..c74d4edab0 --- /dev/null +++ b/src/lib/FlightTasks/tasks/Utility/CMakeLists.txt @@ -0,0 +1,41 @@ +############################################################################ +# +# 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(flight_tasks_utility + ManualSmoothingZ.cpp + ManualSmoothingXY.cpp + StraightLine.cpp +) + +target_link_libraries(flight_tasks_utility PUBLIC flight_task) +target_include_directories(flight_tasks_utility PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file