wrap some includes and functions for nps in #if USE_NPS

This commit is contained in:
Felix Ruess
2012-02-11 02:21:38 +01:00
parent 2e9faab0a7
commit f25e5df094
6 changed files with 10 additions and 7 deletions
@@ -33,6 +33,7 @@ void imu_periodic(void) {
}
#if USE_NPS
#include "nps_sensors.h"
void imu_feed_gyro_accel(void) {
@@ -56,3 +57,4 @@ void imu_feed_mag(void) {
hmc5843.data.value[IMU_MAG_Z_CHAN] = sensors.mag.value.z;
hmc5843.data_available = TRUE;
}
#endif
@@ -35,7 +35,7 @@ void imu_periodic(void) {
}
#ifdef USE_NPS
#if USE_NPS
#include "nps_sensors.h"
void imu_feed_gyro_accel(void) {
@@ -31,7 +31,7 @@
extern int imu_overrun;
#ifdef USE_NPS
#if USE_NPS
extern void imu_feed_gyro_accel(void);
extern void imu_feed_mag(void);
#endif
@@ -10,7 +10,7 @@ void imu_crista_arch_init(void) {
}
#if USE_NPS
#include "nps_sensors.h"
void imu_feed_gyro_accel(void) {
@@ -29,3 +29,4 @@ void imu_feed_mag(void) {
ami601_values[IMU_MAG_Z_CHAN] = sensors.mag.value.z;
ami601_status = AMI601_DATA_AVAILABLE;
}
#endif
@@ -28,7 +28,7 @@
#include <inttypes.h>
#include <caml/mlvalues.h>
#ifdef USE_NPS
#if USE_NPS
#include "nps_radio_control.h"
#endif
@@ -55,7 +55,7 @@ value send_ppm(value unit) {
return unit;
}
#ifdef USE_NPS
#if 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 USE_NPS
#if USE_NPS
void radio_control_feed(void) {}
#endif
@@ -36,7 +36,7 @@
#define PPM_NB_CHANNEL RADIO_CONTROL_NB_CHANNEL
#ifdef USE_NPS
#if USE_NPS
extern void radio_control_feed(void);
#endif