mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 15:37:34 +08:00
move systemlib/pwm_limit to standalone lib
This commit is contained in:
committed by
Lorenz Meier
parent
387bc81f26
commit
e468a9bbcc
@@ -40,5 +40,6 @@ px4_add_module(
|
||||
linux_pwm_out.cpp
|
||||
ocpoc_mmap.cpp
|
||||
DEPENDS
|
||||
pwm_limit
|
||||
)
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#include <lib/mixer/mixer.h>
|
||||
#include <lib/mixer/mixer_load.h>
|
||||
#include <parameters/param.h>
|
||||
#include <systemlib/pwm_limit/pwm_limit.h>
|
||||
#include <pwm_limit/pwm_limit.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@@ -38,5 +38,6 @@ px4_add_module(
|
||||
mkblctrl.cpp
|
||||
mkblctrl_params.c
|
||||
DEPENDS
|
||||
mixer
|
||||
)
|
||||
|
||||
|
||||
@@ -35,4 +35,6 @@ px4_add_module(
|
||||
MAIN pwm_out_sim
|
||||
SRCS
|
||||
PWMSim.cpp
|
||||
DEPENDS
|
||||
mixer
|
||||
)
|
||||
|
||||
@@ -39,5 +39,7 @@ px4_add_module(
|
||||
fmu.cpp
|
||||
DEPENDS
|
||||
circuit_breaker
|
||||
mixer
|
||||
rc
|
||||
pwm_limit
|
||||
)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
#include <lib/mixer/mixer.h>
|
||||
#include <parameters/param.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/pwm_limit/pwm_limit.h>
|
||||
#include <pwm_limit/pwm_limit.h>
|
||||
#include <uORB/topics/actuator_armed.h>
|
||||
#include <uORB/topics/actuator_controls.h>
|
||||
#include <uORB/topics/actuator_outputs.h>
|
||||
|
||||
@@ -43,6 +43,7 @@ px4_add_module(
|
||||
px4io_serial_f7.cpp
|
||||
DEPENDS
|
||||
circuit_breaker
|
||||
mixer
|
||||
)
|
||||
|
||||
# include the px4io binary in ROMFS
|
||||
|
||||
@@ -38,4 +38,5 @@ px4_add_module(
|
||||
snapdragon_pwm_out.cpp
|
||||
DEPENDS
|
||||
mixer
|
||||
pwm_limit
|
||||
)
|
||||
|
||||
@@ -48,12 +48,12 @@
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <drivers/drv_mixer.h>
|
||||
#include <lib/mixer/mixer.h>
|
||||
#include <lib/mixer/mixer_load.h>
|
||||
#include <lib/mixer/mixer_multirotor_normalized.generated.h>
|
||||
#include <mixer/mixer.h>
|
||||
#include <mixer/mixer_load.h>
|
||||
#include <mixer/mixer_multirotor_normalized.generated.h>
|
||||
#include <parameters/param.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/pwm_limit/pwm_limit.h>
|
||||
#include <pwm_limit/pwm_limit.h>
|
||||
#include <dev_fs_lib_pwm.h>
|
||||
|
||||
/*
|
||||
|
||||
@@ -39,5 +39,7 @@ px4_add_module(
|
||||
tap_esc.cpp
|
||||
tap_esc_common.cpp
|
||||
DEPENDS
|
||||
mixer
|
||||
pwm_limit
|
||||
)
|
||||
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <drivers/drv_mixer.h>
|
||||
#include <lib/mixer/mixer.h>
|
||||
#include <systemlib/pwm_limit/pwm_limit.h>
|
||||
#include <mixer/mixer.h>
|
||||
#include <pwm_limit/pwm_limit.h>
|
||||
|
||||
#include "tap_esc_common.h"
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ add_subdirectory(led)
|
||||
add_subdirectory(mathlib)
|
||||
add_subdirectory(mixer)
|
||||
add_subdirectory(perf)
|
||||
add_subdirectory(pwm_limit)
|
||||
add_subdirectory(rc)
|
||||
add_subdirectory(terrain_estimation)
|
||||
add_subdirectory(tunes)
|
||||
|
||||
@@ -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(pwm_limit pwm_limit.c)
|
||||
@@ -41,6 +41,7 @@
|
||||
*/
|
||||
|
||||
#include "pwm_limit.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <stdbool.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
@@ -33,7 +33,6 @@
|
||||
|
||||
add_library(px4iofirmware
|
||||
hx_stream.c
|
||||
../systemlib/pwm_limit/pwm_limit.c
|
||||
adc.c
|
||||
controls.c
|
||||
mixer.cpp
|
||||
@@ -52,4 +51,5 @@ target_link_libraries(px4iofirmware
|
||||
mixer
|
||||
rc
|
||||
perf
|
||||
pwm_limit
|
||||
)
|
||||
@@ -49,10 +49,11 @@
|
||||
|
||||
#include <drivers/drv_pwm_output.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
#include <mixer/mixer.h>
|
||||
#include <pwm_limit/pwm_limit.h>
|
||||
#include <rc/sbus.h>
|
||||
|
||||
#include <systemlib/pwm_limit/pwm_limit.h>
|
||||
#include <lib/mixer/mixer.h>
|
||||
#include <uORB/topics/actuator_controls.h>
|
||||
|
||||
#include "mixer.h"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/pwm_limit/pwm_limit.h>
|
||||
#include <pwm_limit/pwm_limit.h>
|
||||
|
||||
#include <stm32_uart.h>
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
#include "protocol.h"
|
||||
|
||||
#include <systemlib/pwm_limit/pwm_limit.h>
|
||||
#include <pwm_limit/pwm_limit.h>
|
||||
|
||||
/*
|
||||
hotfix: we are critically short of memory in px4io and this is the
|
||||
|
||||
@@ -40,7 +40,6 @@ set(SRCS
|
||||
mavlink_log.c
|
||||
otp.c
|
||||
pid/pid.c
|
||||
pwm_limit/pwm_limit.c
|
||||
)
|
||||
|
||||
if(${OS} STREQUAL "nuttx")
|
||||
|
||||
@@ -82,6 +82,8 @@ px4_add_module(
|
||||
sensors/baro.cpp
|
||||
|
||||
DEPENDS
|
||||
mixer
|
||||
|
||||
git_uavcan
|
||||
|
||||
# within libuavcan
|
||||
|
||||
@@ -42,5 +42,6 @@ px4_add_module(
|
||||
tailsitter.cpp
|
||||
standard.cpp
|
||||
DEPENDS
|
||||
pwm_limit
|
||||
)
|
||||
|
||||
|
||||
@@ -93,4 +93,5 @@ px4_add_module(
|
||||
modules__mc_pos_control__mc_pos_control_tests
|
||||
git_ecl
|
||||
ecl_geo_lookup # TODO: move this
|
||||
pwm_limit
|
||||
)
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <lib/mixer/mixer.h>
|
||||
#include <systemlib/pwm_limit/pwm_limit.h>
|
||||
#include <mixer/mixer.h>
|
||||
#include <pwm_limit/pwm_limit.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <drivers/drv_pwm_output.h>
|
||||
#include <px4iofirmware/mixer.h>
|
||||
|
||||
Reference in New Issue
Block a user