use px4_defines header to distinguish platform

This commit is contained in:
Roman Bapst
2014-11-11 14:55:33 +01:00
parent c8ad06ff99
commit ed409fd537
15 changed files with 22 additions and 63 deletions
-4
View File
@@ -40,12 +40,8 @@
#pragma once
#ifdef CONFIG_ARCH_ARM
__BEGIN_DECLS
__EXPORT float get_mag_declination(float lat, float lon);
__END_DECLS
#else
float get_mag_declination(float lat, float lon);
#endif
+1 -1
View File
@@ -39,7 +39,7 @@
#pragma once
#include <platforms/px4_config.h>
#include <platforms/px4_defines.h>
#include <stdint.h>
namespace math {
+1 -1
View File
@@ -50,7 +50,7 @@
#include "../CMSIS/Include/arm_math.h"
#else
#include <math/eigen_math.h>
#include <Eigen/Eigen>
//#include <Eigen/Eigen>
#endif
namespace math
+3 -5
View File
@@ -42,9 +42,8 @@
#define TOPIC_ACTUATOR_ARMED_H
#include <stdint.h>
#ifdef CONFIG_ARCH_ARM
#include "../uORB.h"
#endif
#include <platforms/px4_defines.h>
/**
* @addtogroup topics
* @{
@@ -65,7 +64,6 @@ struct actuator_armed_s {
*/
/* register this as object request broker structure */
#ifdef CONFIG_ARCH_ARM
ORB_DECLARE(actuator_armed);
#endif
#endif
+1 -5
View File
@@ -47,9 +47,7 @@
#define TOPIC_ACTUATOR_CONTROLS_H
#include <stdint.h>
#ifdef CONFIG_ARCH_ARM
#include "../uORB.h"
#endif
#include <platforms/px4_defines.h>
#define NUM_ACTUATOR_CONTROLS 8
#define NUM_ACTUATOR_CONTROL_GROUPS 4 /**< for sanity checking */
@@ -72,11 +70,9 @@ struct actuator_controls_s {
*/
/* actuator control sets; this list can be expanded as more controllers emerge */
#ifdef CONFIG_ARCH_ARM
ORB_DECLARE(actuator_controls_0);
ORB_DECLARE(actuator_controls_1);
ORB_DECLARE(actuator_controls_2);
ORB_DECLARE(actuator_controls_3);
#endif
#endif
+1 -5
View File
@@ -40,9 +40,7 @@
#ifndef TOPIC_AIRSPEED_H_
#define TOPIC_AIRSPEED_H_
#ifdef CONFIG_ARCH_ARM
#include "../uORB.h"
#endif
#include <platforms/px4_defines.h>
#include <stdint.h>
/**
@@ -65,8 +63,6 @@ struct airspeed_s {
*/
/* register this as object request broker structure */
#ifdef CONFIG_ARCH_ARM
ORB_DECLARE(airspeed);
#endif
#endif
@@ -41,9 +41,8 @@
#define TOPIC_MANUAL_CONTROL_SETPOINT_H_
#include <stdint.h>
#ifdef CONFIG_ARCH_ARM
#include "../uORB.h"
#endif
#include <platforms/px4_defines.h>
/**
* Switch position
*/
@@ -107,7 +106,6 @@ struct manual_control_setpoint_s {
*/
/* register this as object request broker structure */
#ifdef CONFIG_ARCH_ARM
ORB_DECLARE(manual_control_setpoint);
#endif
#endif
+2 -6
View File
@@ -40,9 +40,7 @@
#define TOPIC_PARAMETER_UPDATE_H
#include <stdint.h>
#ifdef CONFIG_ARCH_ARM
#include "../uORB.h"
#endif
#include <platforms/px4_defines.h>
/**
* @addtogroup topics
@@ -58,8 +56,6 @@ struct parameter_update_s {
* @}
*/
#ifdef CONFIG_ARCH_ARM
ORB_DECLARE(parameter_update);
#endif
#endif
#endif
+1 -5
View File
@@ -44,9 +44,7 @@
#include <stdint.h>
#include <stdbool.h>
#ifdef CONFIG_ARCH_ARM
#include "../uORB.h"
#endif
#include <platforms/px4_defines.h>
/**
* @addtogroup topics
@@ -89,8 +87,6 @@ struct vehicle_attitude_s {
*/
/* register this as object request broker structure */
#ifdef CONFIG_ARCH_ARM
ORB_DECLARE(vehicle_attitude);
#endif
#endif
@@ -42,9 +42,7 @@
#include <stdint.h>
#include <stdbool.h>
#ifdef CONFIG_ARCH_ARM
#include "../uORB.h"
#endif
#include <platforms/px4_defines.h>
/**
* @addtogroup topics
@@ -84,8 +82,6 @@ struct vehicle_attitude_setpoint_s {
*/
/* register this as object request broker structure */
#ifdef CONFIG_ARCH_ARM
ORB_DECLARE(vehicle_attitude_setpoint);
#endif
#endif /* TOPIC_ARDRONE_CONTROL_H_ */
@@ -48,9 +48,7 @@
#include <stdint.h>
#include <stdbool.h>
#ifdef CONFIG_ARCH_ARM
#include "../uORB.h"
#endif
#include <platforms/px4_defines.h>
#include "vehicle_status.h"
/**
@@ -92,8 +90,6 @@ struct vehicle_control_mode_s {
*/
/* register this as object request broker structure */
#ifdef CONFIG_ARCH_ARM
ORB_DECLARE(vehicle_control_mode);
#endif
#endif
@@ -45,9 +45,7 @@
#include <stdint.h>
#include <stdbool.h>
#ifdef CONFIG_ARCH_ARM
#include "../uORB.h"
#endif
#include <platforms/px4_defines.h>
/**
* @addtogroup topics
@@ -83,7 +81,6 @@ struct vehicle_global_position_s {
*/
/* register this as object request broker structure */
#ifdef CONFIG_ARCH_ARM
ORB_DECLARE(vehicle_global_position);
#endif
#endif
@@ -41,9 +41,7 @@
#define TOPIC_VEHICLE_RATES_SETPOINT_H_
#include <stdint.h>
#ifdef CONFIG_ARCH_ARM
#include "../uORB.h"
#endif
#include <platforms/px4_defines.h>
/**
* @addtogroup topics
@@ -64,8 +62,6 @@ struct vehicle_rates_setpoint_s {
*/
/* register this as object request broker structure */
#ifdef CONFIG_ARCH_ARM
ORB_DECLARE(vehicle_rates_setpoint);
#endif
#endif
+1 -5
View File
@@ -53,9 +53,7 @@
#include <stdint.h>
#include <stdbool.h>
#ifdef CONFIG_ARCH_ARM
#include "../uORB.h"
#endif
#include <platforms/px4_defines.h>
/**
* @addtogroup topics @{
@@ -252,8 +250,6 @@ struct vehicle_status_s {
*/
/* register this as object request broker structure */
#ifdef CONFIG_ARCH_ARM
ORB_DECLARE(vehicle_status);
#endif
#endif
+3 -1
View File
@@ -36,7 +36,6 @@
*
* Generally used magic defines
*/
#pragma once
#if defined(__linux) || (defined(__APPLE__) && defined(__MACH__))
@@ -45,6 +44,7 @@
*/
#define __EXPORT
//#define PX4_MAIN_FUNCTION(_prefix)
#define ORB_DECLARE(x)
#else
#include <nuttx/config.h>
//#define PX4_MAIN_FUNCTION(_prefix) __EXPORT int _prefix##main(int argc, char **argv)() { return main(argc, argv); }
@@ -53,4 +53,6 @@
#include "drv_orb_dev.h"
#define ACCEL_DEVICE_PATH "/dev/accel"
#include <modules/uORB/uORB.h>
#endif