renamed flag NPS to USE_NPS, ifdef USE_NPS around nps specific funtions in imu_b2 sim file

This commit is contained in:
Felix Ruess
2011-07-27 00:45:47 +02:00
parent f79dd3de56
commit 4746fe38d8
5 changed files with 9 additions and 6 deletions
@@ -17,7 +17,7 @@ NPSDIR = $(SIMDIR)/nps
sim.ARCHDIR = $(ARCH)
sim.CFLAGS += -DSITL -DNPS
sim.CFLAGS += -DSITL -DUSE_NPS
sim.CFLAGS += `pkg-config glib-2.0 --cflags` -I /usr/include/meschach
sim.LDFLAGS += `pkg-config glib-2.0 --libs` -lm -lpcre -lglibivy -lgsl -lgslcblas
sim.CFLAGS += -I$(NPSDIR) -I$(SRC_FIRMWARE) -I$(SRC_BOARD) -I../simulator -I$(PAPARAZZI_HOME)/conf/simulator/nps
@@ -35,6 +35,7 @@ void imu_periodic(void) {
}
#ifdef USE_NPS
#include "nps_sensors.h"
void imu_feed_gyro_accel(void) {
@@ -61,3 +62,4 @@ void imu_feed_mag(void) {
ami601_status = AMI601_DATA_AVAILABLE;
#endif
}
#endif //USE_NPS
@@ -31,8 +31,9 @@
extern int imu_overrun;
#ifdef USE_NPS
extern void imu_feed_gyro_accel(void);
extern void imu_feed_mag(void);
#endif
#endif /* IMU_B2_HW_H */
@@ -28,7 +28,7 @@
#include <inttypes.h>
#include <caml/mlvalues.h>
#ifdef NPS
#ifdef USE_NPS
#include "nps_radio_control.h"
#endif
@@ -55,7 +55,7 @@ value send_ppm(value unit) {
return unit;
}
#ifdef NPS
#ifdef USE_NPS
#define PPM_OF_NPS(_nps, _neutral, _min, _max) \
((_nps) >= 0 ? (_neutral) + (_nps) * ((_max)-(_neutral)) : (_neutral) + (_nps) * ((_neutral)- (_min)))
@@ -94,7 +94,7 @@ value send_ppm(value unit) {
return unit;
}
#ifdef NPS
#ifdef USE_NPS
void radio_control_feed(void) {}
#endif
@@ -36,7 +36,7 @@
#define PPM_NB_CHANNEL RADIO_CONTROL_NB_CHANNEL
#ifdef NPS
#ifdef USE_NPS
extern void radio_control_feed(void);
#endif