diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2015-01-06 19:45:57 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2015-01-06 19:45:57 +0100 |
commit | f37fdd95af06d7b6937cb53d34ea8777342b3aef (patch) | |
tree | 111537db0b95c767e35f5cd8382d8c1954d52f35 /src/platforms | |
parent | ee561947e9100f64a206216104e3ce83e8a304ca (diff) | |
download | px4-firmware-f37fdd95af06d7b6937cb53d34ea8777342b3aef.tar.gz px4-firmware-f37fdd95af06d7b6937cb53d34ea8777342b3aef.tar.bz2 px4-firmware-f37fdd95af06d7b6937cb53d34ea8777342b3aef.zip |
add and use PX4_ROS preprocessor define
Diffstat (limited to 'src/platforms')
-rw-r--r-- | src/platforms/px4_defines.h | 2 | ||||
-rw-r--r-- | src/platforms/px4_includes.h | 2 | ||||
-rw-r--r-- | src/platforms/px4_middleware.h | 4 | ||||
-rw-r--r-- | src/platforms/px4_nodehandle.h | 4 | ||||
-rw-r--r-- | src/platforms/px4_publisher.h | 4 | ||||
-rw-r--r-- | src/platforms/px4_subscriber.h | 8 |
6 files changed, 13 insertions, 11 deletions
diff --git a/src/platforms/px4_defines.h b/src/platforms/px4_defines.h index ef43c55b8..457b5abe3 100644 --- a/src/platforms/px4_defines.h +++ b/src/platforms/px4_defines.h @@ -46,7 +46,7 @@ #define PX4_PARAM_DEFINE_FLOAT(_name) PARAM_DEFINE_FLOAT(_name, PX4_PARAM_DEFAULT_VALUE_NAME(_name)) -#if defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__PX4_ROS) /* * Building for running within the ROS environment */ diff --git a/src/platforms/px4_includes.h b/src/platforms/px4_includes.h index 4d29bc3cd..fc31162c8 100644 --- a/src/platforms/px4_includes.h +++ b/src/platforms/px4_includes.h @@ -41,7 +41,7 @@ #include <stdbool.h> -#if defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__PX4_ROS) /* * Building for running within the ROS environment */ diff --git a/src/platforms/px4_middleware.h b/src/platforms/px4_middleware.h index 54050de8b..cd52fd650 100644 --- a/src/platforms/px4_middleware.h +++ b/src/platforms/px4_middleware.h @@ -42,7 +42,7 @@ #include <stdint.h> #include <unistd.h> -#if defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__PX4_ROS) #define __EXPORT #endif @@ -53,7 +53,7 @@ __EXPORT void init(int argc, char *argv[], const char *process_name); __EXPORT uint64_t get_time_micros(); -#if defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__PX4_ROS) /** * Returns true if the app/task should continue to run */ diff --git a/src/platforms/px4_nodehandle.h b/src/platforms/px4_nodehandle.h index 3c2bb2d44..624a466fd 100644 --- a/src/platforms/px4_nodehandle.h +++ b/src/platforms/px4_nodehandle.h @@ -43,7 +43,7 @@ #include "px4_publisher.h" #include "px4_middleware.h" -#if defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__PX4_ROS) /* includes when building for ros */ #include "ros/ros.h" #include <list> @@ -55,7 +55,7 @@ namespace px4 { -#if defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__PX4_ROS) class NodeHandle : private ros::NodeHandle { diff --git a/src/platforms/px4_publisher.h b/src/platforms/px4_publisher.h index 6b6d8e39e..c6f3d6108 100644 --- a/src/platforms/px4_publisher.h +++ b/src/platforms/px4_publisher.h @@ -37,7 +37,7 @@ * PX4 Middleware Wrapper Node Handle */ #pragma once -#if defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__PX4_ROS) /* includes when building for ros */ #include "ros/ros.h" #else @@ -60,7 +60,7 @@ public: }; -#if defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__PX4_ROS) class Publisher : public PublisherBase { diff --git a/src/platforms/px4_subscriber.h b/src/platforms/px4_subscriber.h index 4b6d5b58f..107c60189 100644 --- a/src/platforms/px4_subscriber.h +++ b/src/platforms/px4_subscriber.h @@ -36,9 +36,11 @@ * * PX4 Middleware Wrapper Subscriber */ -#include <functional> #pragma once -#if defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) + +#include <functional> + +#if defined(__PX4_ROS) /* includes when building for ros */ #include "ros/ros.h" #else @@ -87,7 +89,7 @@ public: virtual void * get_void_ptr() = 0; }; -#if defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__PX4_ROS) /** * Subscriber class that is templated with the ros n message type */ |