FlightTasks: move FlightTask to own folder/lib

fix header includes
add cmake subdirectories dynamically
This commit is contained in:
ChristophTobler 2018-08-03 09:16:03 +02:00 committed by Dennis Mannhart
parent 1b1b3b5484
commit 4bbde0df8c
12 changed files with 54 additions and 25 deletions

View File

@ -41,8 +41,8 @@
#pragma once
#include "tasks/FlightTask.hpp"
#include "tasks/SubscriptionArray.hpp"
#include "FlightTask.hpp"
#include "SubscriptionArray.hpp"
#include "FlightTasks_generated.hpp"
#include <new>

View File

@ -36,4 +36,4 @@ px4_add_library(FlightTaskAuto
)
target_link_libraries(FlightTaskAuto PUBLIC FlightTask)
target_include_directories(FlightTaskAuto PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ../)
target_include_directories(FlightTaskAuto PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -31,24 +31,14 @@
#
############################################################################
px4_add_library(FlightTask
FlightTask.cpp
SubscriptionArray.cpp
)
target_include_directories(FlightTask PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
# add the core Flight tasks that the additional flight tasks depend on
add_subdirectory(FlightTask)
add_subdirectory(Utility)
add_subdirectory(Manual)
add_subdirectory(ManualAltitude)
add_subdirectory(ManualAltitudeSmooth)
add_subdirectory(ManualPosition)
add_subdirectory(ManualPositionSmooth)
add_subdirectory(ManualStabilized)
add_subdirectory(Sport)
add_subdirectory(Auto)
add_subdirectory(AutoMapper)
add_subdirectory(AutoLine)
add_subdirectory(AutoFollowMe)
add_subdirectory(Offboard)
add_subdirectory(Orbit)
# add all additional flight tasks
foreach(task ${flight_tasks_all})
add_subdirectory(${task})
endforeach()

View File

@ -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(FlightTask
FlightTask.cpp
SubscriptionArray.cpp
)
target_include_directories(FlightTask PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -36,4 +36,4 @@ px4_add_library(FlightTaskManual
)
target_link_libraries(FlightTaskManual PUBLIC FlightTask)
target_include_directories(FlightTaskManual PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ../)
target_include_directories(FlightTaskManual PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -40,7 +40,7 @@
#pragma once
#include "FlightTaskManualAltitude.hpp"
#include "Utility/ManualSmoothingZ.hpp"
#include "ManualSmoothingZ.hpp"
class FlightTaskManualAltitudeSmooth : public FlightTaskManualAltitude
{

View File

@ -40,8 +40,8 @@
#pragma once
#include "FlightTaskManualPosition.hpp"
#include "Utility/ManualSmoothingXY.hpp"
#include "Utility/ManualSmoothingZ.hpp"
#include "ManualSmoothingXY.hpp"
#include "ManualSmoothingZ.hpp"
class FlightTaskManualPositionSmooth : public FlightTaskManualPosition
{

View File

@ -36,4 +36,4 @@ px4_add_library(FlightTaskOffboard
)
target_link_libraries(FlightTaskOffboard PUBLIC FlightTask)
target_include_directories(FlightTaskOffboard PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ../)
target_include_directories(FlightTaskOffboard PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})