From fd0f52bebd0a2c05a860768bfcf51cd1ca078701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Thu, 19 May 2016 11:08:37 +0200 Subject: [PATCH] orb macros: cleanup some unused code (#4576) --- msg/mission.msg | 2 -- src/drivers/drv_orb_dev.h | 3 --- src/modules/navigator/navigation.h | 3 --- src/modules/uORB/uORB.h | 4 +--- src/modules/uORB/uORBManager.hpp | 3 --- 5 files changed, 1 insertion(+), 14 deletions(-) diff --git a/msg/mission.msg b/msg/mission.msg index e208d36929..b25940c07a 100644 --- a/msg/mission.msg +++ b/msg/mission.msg @@ -2,6 +2,4 @@ int32 dataman_id # default 0, there are two offboard storage places in the datam uint32 count # count of the missions stored in the dataman int32 current_seq # default -1, start at the one changed latest -# fixme: there is no mission definition in objects_common.cpp -# but it's required for systemcmds/topic_listener/topic_listener # TOPICS mission offboard_mission onboard_mission diff --git a/src/drivers/drv_orb_dev.h b/src/drivers/drv_orb_dev.h index 37e9bdb7cf..79a2895fb5 100644 --- a/src/drivers/drv_orb_dev.h +++ b/src/drivers/drv_orb_dev.h @@ -45,9 +45,6 @@ #include #include -/* XXX for ORB_DECLARE used in many drivers */ -#include "../modules/uORB/uORB.h" - /* * ioctl() definitions */ diff --git a/src/modules/navigator/navigation.h b/src/modules/navigator/navigation.h index 7fadabbd2c..3497b8563e 100644 --- a/src/modules/navigator/navigation.h +++ b/src/modules/navigator/navigation.h @@ -119,8 +119,5 @@ struct mission_item_s { * @} */ -/* register this as object request broker structure */ -ORB_DECLARE(offboard_mission); -ORB_DECLARE(onboard_mission); #endif diff --git a/src/modules/uORB/uORB.h b/src/modules/uORB/uORB.h index fba37a57af..57e12f9236 100644 --- a/src/modules/uORB/uORB.h +++ b/src/modules/uORB/uORB.h @@ -89,16 +89,14 @@ enum ORB_PRIO { #define ORB_ID(_name) &__orb_##_name /** - * Declare (prototype) the uORB metadata for a topic. + * Declare (prototype) the uORB metadata for a topic (used by code generators). * * @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 #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 #endif /** diff --git a/src/modules/uORB/uORBManager.hpp b/src/modules/uORB/uORBManager.hpp index eb02a42b39..ca5aee846e 100644 --- a/src/modules/uORB/uORBManager.hpp +++ b/src/modules/uORB/uORBManager.hpp @@ -187,9 +187,6 @@ public: * for the topic. * @return ERROR on error, otherwise returns a handle * that can be used to read and update the topic. - * If the topic in question is not known (due to an - * ORB_DEFINE_OPTIONAL with no corresponding ORB_DECLARE) - * this function will return -1 and set errno to ENOENT. */ int orb_subscribe(const struct orb_metadata *meta) ;