Move StickYaw class into a globally available library

This commit is contained in:
Matthias Grob 2025-04-01 19:33:55 +02:00
parent bae6328c7b
commit 174147208e
12 changed files with 46 additions and 10 deletions

View File

@ -72,6 +72,7 @@ add_subdirectory(rover_control EXCLUDE_FROM_ALL)
add_subdirectory(rtl EXCLUDE_FROM_ALL)
add_subdirectory(sensor_calibration EXCLUDE_FROM_ALL)
add_subdirectory(slew_rate EXCLUDE_FROM_ALL)
add_subdirectory(stick_yaw EXCLUDE_FROM_ALL)
add_subdirectory(systemlib EXCLUDE_FROM_ALL)
add_subdirectory(system_identification EXCLUDE_FROM_ALL)
add_subdirectory(tecs EXCLUDE_FROM_ALL)

View File

@ -0,0 +1,37 @@
############################################################################
#
# Copyright (c) 2019 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(StickYaw
StickYaw.cpp
)
target_include_directories(StickYaw PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -35,5 +35,5 @@ px4_add_library(FlightTaskAuto
FlightTaskAuto.cpp
)
target_link_libraries(FlightTaskAuto PUBLIC FlightTask FlightTaskUtility WeatherVane)
target_link_libraries(FlightTaskAuto PUBLIC FlightTask FlightTaskUtility StickYaw WeatherVane)
target_include_directories(FlightTaskAuto PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -46,12 +46,12 @@
#include <uORB/topics/manual_control_setpoint.h>
#include <uORB/topics/vehicle_status.h>
#include <lib/geo/geo.h>
#include <lib/weather_vane/WeatherVane.hpp>
#include <lib/mathlib/math/filter/AlphaFilter.hpp>
#include <lib/motion_planning/PositionSmoothing.hpp>
#include <lib/stick_yaw/StickYaw.hpp>
#include <lib/weather_vane/WeatherVane.hpp>
#include "Sticks.hpp"
#include "StickAccelerationXY.hpp"
#include "StickYaw.hpp"
/**
* This enum has to agree with position_setpoint_s type definition

View File

@ -35,5 +35,5 @@ px4_add_library(FlightTaskDescend
FlightTaskDescend.cpp
)
target_link_libraries(FlightTaskDescend PUBLIC FlightTask FlightTaskUtility)
target_link_libraries(FlightTaskDescend PUBLIC FlightTask FlightTaskUtility StickYaw)
target_include_directories(FlightTaskDescend PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -37,10 +37,10 @@
#pragma once
#include <lib/stick_yaw/StickYaw.hpp>
#include "FlightTask.hpp"
#include "Sticks.hpp"
#include "StickTiltXY.hpp"
#include "StickYaw.hpp"
class FlightTaskDescend : public FlightTask
{

View File

@ -33,10 +33,9 @@
#pragma once
#include <lib/weather_vane/WeatherVane.hpp>
#include "FlightTaskManualAltitudeSmoothVel.hpp"
#include "StickAccelerationXY.hpp"
#include "StickYaw.hpp"
#include <lib/weather_vane/WeatherVane.hpp>
class FlightTaskManualAcceleration : public FlightTaskManualAltitudeSmoothVel
{

View File

@ -35,5 +35,5 @@ px4_add_library(FlightTaskManualAltitude
FlightTaskManualAltitude.cpp
)
target_link_libraries(FlightTaskManualAltitude PUBLIC FlightTask FlightTaskUtility)
target_link_libraries(FlightTaskManualAltitude PUBLIC FlightTask FlightTaskUtility StickYaw)
target_include_directories(FlightTaskManualAltitude PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -39,10 +39,10 @@
#pragma once
#include <lib/stick_yaw/StickYaw.hpp>
#include "FlightTask.hpp"
#include "Sticks.hpp"
#include "StickTiltXY.hpp"
#include "StickYaw.hpp"
#include <uORB/Subscription.hpp>
class FlightTaskManualAltitude : public FlightTask

View File

@ -35,7 +35,6 @@ px4_add_library(FlightTaskUtility
Sticks.cpp
StickAccelerationXY.cpp
StickTiltXY.cpp
StickYaw.cpp
Gimbal.cpp
)