mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-05 19:00:35 +08:00
boards organization
This commit is contained in:
committed by
David Sidrane
parent
c1f851a600
commit
f692ad04d0
@@ -30,6 +30,9 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
add_subdirectory(failure_detector)
|
||||
|
||||
px4_add_module(
|
||||
MODULE modules__commander
|
||||
MAIN commander
|
||||
@@ -52,10 +55,14 @@ px4_add_module(
|
||||
rc_calibration.cpp
|
||||
rc_check.cpp
|
||||
state_machine_helper.cpp
|
||||
failure_detector/FailureDetector.cpp
|
||||
DEPENDS
|
||||
circuit_breaker
|
||||
df_driver_framework
|
||||
failure_detector
|
||||
git_ecl
|
||||
ecl_geo
|
||||
)
|
||||
|
||||
if(PX4_TESTING)
|
||||
add_subdirectory(commander_tests)
|
||||
endif()
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
############################################################################
|
||||
#
|
||||
# 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(failure_detector
|
||||
FailureDetector.cpp
|
||||
)
|
||||
@@ -70,3 +70,7 @@ px4_add_module(
|
||||
version
|
||||
UNITY_BUILD
|
||||
)
|
||||
|
||||
if(PX4_TESTING)
|
||||
add_subdirectory(mavlink_tests)
|
||||
endif()
|
||||
|
||||
@@ -76,7 +76,7 @@ if (GENERATE_RTPS_BRIDGE)
|
||||
###############################################################################
|
||||
# micro-cdr serialization
|
||||
###############################################################################
|
||||
include(common/px4_git)
|
||||
include(px4_git)
|
||||
px4_add_git_submodule(TARGET git_micro_cdr PATH micro-CDR)
|
||||
add_subdirectory(micro-CDR)
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ configure_file(simulator_config.h.in simulator_config.h @ONLY)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set(SIMULATOR_SRCS simulator.cpp)
|
||||
if (NOT ${OS} STREQUAL "qurt")
|
||||
if (NOT ${PX4_PLATFORM} STREQUAL "qurt")
|
||||
list(APPEND SIMULATOR_SRCS
|
||||
simulator_mavlink.cpp)
|
||||
endif()
|
||||
|
||||
@@ -40,7 +40,7 @@ set(SRCS
|
||||
otp.c
|
||||
)
|
||||
|
||||
if(${OS} STREQUAL "nuttx")
|
||||
if(${PX4_PLATFORM} STREQUAL "nuttx")
|
||||
list(APPEND SRCS
|
||||
print_load_nuttx.c
|
||||
)
|
||||
@@ -51,7 +51,7 @@ else()
|
||||
endif()
|
||||
|
||||
# TODO: find a better way to do this
|
||||
if (NOT "${CONFIG}" MATCHES "px4io")
|
||||
if (NOT "${PX4_BOARD}" MATCHES "px4io")
|
||||
px4_add_library(systemlib ${SRCS})
|
||||
else()
|
||||
add_library(systemlib ${PX4_SOURCE_DIR}/src/platforms/empty.c)
|
||||
|
||||
@@ -50,3 +50,7 @@ px4_add_module(
|
||||
DEPENDS
|
||||
uorb_msgs
|
||||
)
|
||||
|
||||
if(PX4_TESTING)
|
||||
add_subdirectory(uORB_tests)
|
||||
endif()
|
||||
|
||||
@@ -35,21 +35,22 @@ px4_add_git_submodule(TARGET git_uavcan PATH "libuavcan")
|
||||
|
||||
set(UAVCAN_USE_CPP03 ON CACHE BOOL "uavcan cpp03")
|
||||
|
||||
# The default is the stm32
|
||||
if(NOT UAVCAN_PLATFORM)
|
||||
set(UAVCAN_PLATFORM stm32 CACHE STRING "uavcan platform")
|
||||
endif()
|
||||
if(CONFIG_ARCH_CHIP)
|
||||
|
||||
# The default timer the 5
|
||||
if(NOT UAVCAN_TIMER)
|
||||
set(UAVCAN_TIMER 5)
|
||||
if (${CONFIG_ARCH_CHIP} MATCHES "kinetis")
|
||||
set(UAVCAN_PLATFORM "kinetis")
|
||||
set(UAVCAN_TIMER 1)
|
||||
elseif (${CONFIG_ARCH_CHIP} MATCHES "stm32")
|
||||
set(UAVCAN_PLATFORM "stm32")
|
||||
set(UAVCAN_TIMER 5) # The default timer the 5
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT config_uavcan_num_ifaces)
|
||||
message(FATAL_ERROR "config_uavcan_num_ifaces not set")
|
||||
endif()
|
||||
|
||||
string(TOUPPER "${OS}" OS_UPPER)
|
||||
string(TOUPPER "${PX4_PLATFORM}" OS_UPPER)
|
||||
string(TOUPPER "${UAVCAN_PLATFORM}" UAVCAN_PLATFORM_UPPER)
|
||||
add_definitions(
|
||||
-DUAVCAN_CPP_VERSION=UAVCAN_CPP03
|
||||
|
||||
@@ -36,7 +36,7 @@ px4_add_git_submodule(TARGET git_uavcan PATH "../uavcan/libuavcan")
|
||||
set(UAVCAN_USE_CPP03 ON CACHE BOOL "uavcan cpp03")
|
||||
set(UAVCAN_PLATFORM stm32 CACHE STRING "uavcan platform")
|
||||
|
||||
string(TOUPPER "${OS}" OS_UPPER)
|
||||
string(TOUPPER "${PX4_PLATFORM}" OS_UPPER)
|
||||
add_definitions(
|
||||
-DUAVCAN_CPP_VERSION=UAVCAN_CPP03
|
||||
-DUAVCAN_MAX_NETWORK_SIZE_HINT=16
|
||||
|
||||
@@ -36,7 +36,7 @@ px4_add_git_submodule(TARGET git_uavcan PATH "../uavcan/libuavcan")
|
||||
set(UAVCAN_USE_CPP03 ON CACHE BOOL "uavcan cpp03")
|
||||
set(UAVCAN_PLATFORM stm32 CACHE STRING "uavcan platform")
|
||||
|
||||
string(TOUPPER "${OS}" OS_UPPER)
|
||||
string(TOUPPER "${PX4_PLATFORM}" OS_UPPER)
|
||||
add_definitions(
|
||||
-DUAVCAN_CPP_VERSION=UAVCAN_CPP03
|
||||
-DUAVCAN_MAX_NETWORK_SIZE_HINT=16
|
||||
|
||||
Reference in New Issue
Block a user