mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
move systemlib/airspeed to standalone lib
This commit is contained in:
parent
b23e40ca42
commit
20aabd3566
@ -38,11 +38,12 @@
|
||||
* Driver for the Eagle Tree Airspeed V3 connected via I2C.
|
||||
*/
|
||||
|
||||
#include <cfloat>
|
||||
|
||||
#include <px4_config.h>
|
||||
|
||||
#include <drivers/device/i2c.h>
|
||||
|
||||
#include <systemlib/airspeed.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <parameters/param.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
@ -54,7 +54,6 @@
|
||||
|
||||
#include <drivers/device/i2c.h>
|
||||
|
||||
#include <systemlib/airspeed.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <parameters/param.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
@ -41,7 +41,6 @@
|
||||
#include <mathlib/math/filter/LowPassFilter2p.hpp>
|
||||
#include <px4_config.h>
|
||||
#include <sys/types.h>
|
||||
#include <systemlib/airspeed.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <uORB/topics/differential_pressure.h>
|
||||
#include <uORB/uORB.h>
|
||||
|
||||
@ -49,7 +49,6 @@
|
||||
#include <mathlib/math/filter/LowPassFilter2p.hpp>
|
||||
#include <px4_config.h>
|
||||
#include <sys/types.h>
|
||||
#include <systemlib/airspeed.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <uORB/topics/differential_pressure.h>
|
||||
#include <uORB/uORB.h>
|
||||
|
||||
@ -34,6 +34,7 @@
|
||||
px4_add_git_submodule(TARGET git_ecl PATH "ecl")
|
||||
px4_add_git_submodule(TARGET git_matrix PATH "matrix")
|
||||
|
||||
add_subdirectory(airspeed)
|
||||
add_subdirectory(battery)
|
||||
add_subdirectory(circuit_breaker)
|
||||
add_subdirectory(controllib)
|
||||
|
||||
34
src/lib/airspeed/CMakeLists.txt
Normal file
34
src/lib/airspeed/CMakeLists.txt
Normal file
@ -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(airspeed airspeed.cpp)
|
||||
@ -43,7 +43,6 @@
|
||||
#define AIRSPEED_H_
|
||||
|
||||
#include "math.h"
|
||||
#include "conversions.h"
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
@ -43,7 +43,6 @@
|
||||
|
||||
#include <drivers/device/i2c.h>
|
||||
|
||||
#include <systemlib/airspeed.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <parameters/param.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
@ -40,7 +40,6 @@
|
||||
#include <px4_config.h>
|
||||
#include <px4_defines.h>
|
||||
#include <px4_workqueue.h>
|
||||
#include <systemlib/airspeed.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <uORB/topics/differential_pressure.h>
|
||||
#include <uORB/uORB.h>
|
||||
|
||||
@ -55,7 +55,6 @@
|
||||
#include <systemlib/mavlink_log.h>
|
||||
#include <parameters/param.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <systemlib/airspeed.h>
|
||||
|
||||
static const char *sensor_name = "airspeed";
|
||||
|
||||
|
||||
@ -61,6 +61,7 @@ px4_add_module(
|
||||
mavlink_ulog.cpp
|
||||
mavlink_timesync.cpp
|
||||
DEPENDS
|
||||
airspeed
|
||||
git_mavlink_v2
|
||||
conversion
|
||||
git_ecl
|
||||
|
||||
@ -79,16 +79,15 @@
|
||||
#include <sys/statfs.h>
|
||||
#endif
|
||||
|
||||
#include <airspeed/airspeed.h>
|
||||
#include <ecl/geo/geo.h>
|
||||
#include <mathlib/mathlib.h>
|
||||
|
||||
#include <conversion/rotation.h>
|
||||
|
||||
#include <parameters/param.h>
|
||||
#include <systemlib/mavlink_log.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <systemlib/airspeed.h>
|
||||
|
||||
#include <commander/px4_custom_mode.h>
|
||||
#include <lib/ecl/geo/geo.h>
|
||||
|
||||
#include <uORB/topics/vehicle_command_ack.h>
|
||||
|
||||
|
||||
@ -46,6 +46,7 @@ px4_add_module(
|
||||
temperature_compensation.cpp
|
||||
|
||||
DEPENDS
|
||||
airspeed
|
||||
battery
|
||||
conversion
|
||||
drivers__device
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
#include <drivers/drv_airspeed.h>
|
||||
#include <drivers/drv_px4flow.h>
|
||||
|
||||
#include <systemlib/airspeed.h>
|
||||
#include <airspeed/airspeed.h>
|
||||
#include <parameters/param.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
@ -54,7 +54,6 @@
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <systemlib/airspeed.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <parameters/param.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
@ -57,7 +57,6 @@
|
||||
#include <px4_workqueue.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include <systemlib/airspeed.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <parameters/param.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
@ -59,7 +59,6 @@
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <systemlib/airspeed.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <parameters/param.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
@ -32,7 +32,6 @@
|
||||
############################################################################
|
||||
|
||||
set(SRCS
|
||||
airspeed.cpp
|
||||
conversions.c
|
||||
cpuload.c
|
||||
crc.c
|
||||
|
||||
@ -130,11 +130,6 @@ union udid {
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* s
|
||||
*/
|
||||
//__EXPORT float calc_indicated_airspeed(float differential_pressure);
|
||||
|
||||
__EXPORT void F_unlock(void);
|
||||
__EXPORT void F_lock(void);
|
||||
__EXPORT int val_read(void *dest, volatile const void *src, int bytes);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user