mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 02:23:34 +08:00
FlightTasks: move FlightTask to own folder/lib
fix header includes add cmake subdirectories dynamically
This commit is contained in:
committed by
Dennis Mannhart
parent
1b1b3b5484
commit
4bbde0df8c
@@ -41,8 +41,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "tasks/FlightTask.hpp"
|
#include "FlightTask.hpp"
|
||||||
#include "tasks/SubscriptionArray.hpp"
|
#include "SubscriptionArray.hpp"
|
||||||
#include "FlightTasks_generated.hpp"
|
#include "FlightTasks_generated.hpp"
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|||||||
@@ -36,4 +36,4 @@ px4_add_library(FlightTaskAuto
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(FlightTaskAuto PUBLIC FlightTask)
|
target_link_libraries(FlightTaskAuto PUBLIC FlightTask)
|
||||||
target_include_directories(FlightTaskAuto PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ../)
|
target_include_directories(FlightTaskAuto PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|||||||
@@ -31,24 +31,14 @@
|
|||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
px4_add_library(FlightTask
|
# add the core Flight tasks that the additional flight tasks depend on
|
||||||
FlightTask.cpp
|
add_subdirectory(FlightTask)
|
||||||
SubscriptionArray.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(FlightTask PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
|
||||||
|
|
||||||
add_subdirectory(Utility)
|
add_subdirectory(Utility)
|
||||||
add_subdirectory(Manual)
|
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(Auto)
|
||||||
add_subdirectory(AutoMapper)
|
add_subdirectory(AutoMapper)
|
||||||
add_subdirectory(AutoLine)
|
|
||||||
add_subdirectory(AutoFollowMe)
|
# add all additional flight tasks
|
||||||
add_subdirectory(Offboard)
|
foreach(task ${flight_tasks_all})
|
||||||
add_subdirectory(Orbit)
|
add_subdirectory(${task})
|
||||||
|
endforeach()
|
||||||
@@ -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})
|
||||||
@@ -36,4 +36,4 @@ px4_add_library(FlightTaskManual
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(FlightTaskManual PUBLIC FlightTask)
|
target_link_libraries(FlightTaskManual PUBLIC FlightTask)
|
||||||
target_include_directories(FlightTaskManual PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ../)
|
target_include_directories(FlightTaskManual PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "FlightTaskManualAltitude.hpp"
|
#include "FlightTaskManualAltitude.hpp"
|
||||||
#include "Utility/ManualSmoothingZ.hpp"
|
#include "ManualSmoothingZ.hpp"
|
||||||
|
|
||||||
class FlightTaskManualAltitudeSmooth : public FlightTaskManualAltitude
|
class FlightTaskManualAltitudeSmooth : public FlightTaskManualAltitude
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,8 +40,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "FlightTaskManualPosition.hpp"
|
#include "FlightTaskManualPosition.hpp"
|
||||||
#include "Utility/ManualSmoothingXY.hpp"
|
#include "ManualSmoothingXY.hpp"
|
||||||
#include "Utility/ManualSmoothingZ.hpp"
|
#include "ManualSmoothingZ.hpp"
|
||||||
|
|
||||||
class FlightTaskManualPositionSmooth : public FlightTaskManualPosition
|
class FlightTaskManualPositionSmooth : public FlightTaskManualPosition
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,4 +36,4 @@ px4_add_library(FlightTaskOffboard
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(FlightTaskOffboard PUBLIC FlightTask)
|
target_link_libraries(FlightTaskOffboard PUBLIC FlightTask)
|
||||||
target_include_directories(FlightTaskOffboard PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ../)
|
target_include_directories(FlightTaskOffboard PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|||||||
Reference in New Issue
Block a user