mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-16 22:00:35 +08:00
Merge branch 'master' of github.com:PX4/Firmware into control_state
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2012-2015 PX4 Development Team. All rights reserved.
|
||||
# Copyright (c) 2015 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
|
||||
@@ -31,36 +31,53 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
#
|
||||
# Makefile to build uORB
|
||||
#
|
||||
# this includes the generated topics directory
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
MODULE_COMMAND = uorb
|
||||
set(SRCS
|
||||
objects_common.cpp
|
||||
uORBUtils.cpp
|
||||
uORB.cpp
|
||||
uORBMain.cpp
|
||||
Publication.cpp
|
||||
Subscription.cpp
|
||||
)
|
||||
|
||||
MODULE_STACKSIZE = 2048
|
||||
if(${OS} STREQUAL "nuttx")
|
||||
list(APPEND SRCS
|
||||
uORBDevices_nuttx.cpp
|
||||
uORBTest_UnitTest.cpp
|
||||
uORBManager_nuttx.cpp
|
||||
)
|
||||
elseif(${OS} STREQUAL "posix")
|
||||
list(APPEND SRCS
|
||||
uORBDevices_posix.cpp
|
||||
uORBManager_posix.cpp
|
||||
uORBTest_UnitTest.cpp
|
||||
)
|
||||
elseif(${OS} STREQUAL "posix-arm")
|
||||
list(APPEND SRCS
|
||||
uORBDevices_posix.cpp
|
||||
uORBManager_posix.cpp
|
||||
uORBTest_UnitTest.cpp
|
||||
)
|
||||
elseif(${OS} STREQUAL "qurt")
|
||||
list(APPEND SRCS
|
||||
uORBDevices_posix.cpp
|
||||
uORBManager_posix.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
ifeq ($(PX4_TARGET_OS),nuttx)
|
||||
SRCS = uORBDevices_nuttx.cpp \
|
||||
uORBTest_UnitTest.cpp \
|
||||
uORBManager_nuttx.cpp
|
||||
|
||||
else
|
||||
SRCS = uORBDevices_posix.cpp \
|
||||
uORBManager_posix.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(PX4_TARGET_OS),posix)
|
||||
SRCS += uORBTest_UnitTest.cpp
|
||||
endif
|
||||
ifeq ($(PX4_TARGET_OS),posix-arm)
|
||||
SRCS += uORBTest_UnitTest.cpp
|
||||
endif
|
||||
|
||||
SRCS += objects_common.cpp \
|
||||
uORBUtils.cpp \
|
||||
uORB.cpp \
|
||||
uORBMain.cpp \
|
||||
Publication.cpp \
|
||||
Subscription.cpp
|
||||
|
||||
MAXOPTIMIZATION = -Os
|
||||
px4_add_module(
|
||||
MODULE modules__uORB
|
||||
MAIN uorb
|
||||
STACK 2048
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS ${SRCS}
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
@@ -89,20 +89,14 @@ enum ORB_PRIO {
|
||||
/**
|
||||
* Declare (prototype) the uORB metadata for a topic.
|
||||
*
|
||||
* Note that optional topics are declared weak; this allows a potential
|
||||
* subscriber to attempt to subscribe to a topic that is not known to the
|
||||
* system at runtime. The ORB_ID() macro will return NULL/nullptr for
|
||||
* such a topic, and attempts to advertise or subscribe to it will
|
||||
* return -1/ENOENT (see below).
|
||||
*
|
||||
* @param _name The name of the topic.
|
||||
*/
|
||||
#if defined(__cplusplus)
|
||||
# define ORB_DECLARE(_name) extern "C" const struct orb_metadata __orb_##_name __EXPORT
|
||||
# define ORB_DECLARE_OPTIONAL(_name) extern "C" const struct orb_metadata __orb_##_name __EXPORT __attribute__((weak))
|
||||
# define ORB_DECLARE_OPTIONAL(_name) extern "C" const struct orb_metadata __orb_##_name __EXPORT
|
||||
#else
|
||||
# define ORB_DECLARE(_name) extern const struct orb_metadata __orb_##_name __EXPORT
|
||||
# define ORB_DECLARE_OPTIONAL(_name) extern const struct orb_metadata __orb_##_name __EXPORT __attribute__((weak))
|
||||
# define ORB_DECLARE_OPTIONAL(_name) extern const struct orb_metadata __orb_##_name __EXPORT
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user