Merge branch 'baro' into dev

This commit is contained in:
Felix Ruess
2012-01-29 19:04:11 +01:00
8 changed files with 20 additions and 38 deletions
+1 -5
View File
@@ -1330,11 +1330,7 @@
<field name="status" type="uint8" values="OK|LOST|REALLY_LOST"/>
</message>
<message name="BOOZ_BARO_RAW" id="161">
<field name="offset" type="uint16"/>
<field name="value" type="uint16"/>
<field name="value_filtered" type="uint16"/>
</message>
<!-- 161 is free -->
<message name="VFF" id="162">
<field name="measure" type="float"/>
-1
View File
@@ -6,7 +6,6 @@
</header>
<init fun="baro_init()"/>
<periodic fun="baro_periodic()" freq="60."/>
<periodic fun="baro_downlink_raw()" freq="10." autorun="FALSE"/>
<event fun="BaroEvent(baro_abs,baro_diff)"/>
<makefile target="ap">
<file name="baro_board.c" dir="boards/$(BOARD)"/>
+4 -3
View File
@@ -69,13 +69,14 @@
<message name="IMU_ACCEL_RAW" period=".05"/>
<message name="IMU_GYRO_RAW" period=".05"/>
<message name="IMU_MAG_RAW" period=".05"/>
<message name="BARO_RAW" period="0.5"/>
</mode>
<mode name="scaled_sensors">
<message name="DL_VALUE" period="0.5"/>
<message name="ALIVE" period="2.1"/>
<message name="IMU_GYRO" period=".075"/>
<message name="IMU_ACCEL" period=".075"/>
<message name="IMU_MAG" period=".1"/>
<message name="IMU_GYRO" period=".075"/>
<message name="IMU_ACCEL" period=".075"/>
<message name="IMU_MAG" period=".1"/>
</mode>
<mode name="debug_imu">
<message name="ATTITUDE" period="0.1"/>
@@ -69,6 +69,7 @@
<message name="IMU_ACCEL_RAW" period=".05"/>
<message name="IMU_GYRO_RAW" period=".05"/>
<message name="IMU_MAG_RAW" period=".05"/>
<message name="BARO_RAW" period="0.5"/>
</mode>
<mode name="scaled_sensors">
<message name="DL_VALUE" period="0.5"/>
-13
View File
@@ -27,14 +27,6 @@
#include "subsystems/sensors/baro.h"
// Downlink
#include "mcu_periph/uart.h"
#include "messages.h"
#include "subsystems/datalink/downlink.h"
#ifndef DOWNLINK_DEVICE
#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE
#endif
/* Common Baro struct */
struct Baro baro;
@@ -78,8 +70,3 @@ void baro_periodic( void ) {
ads1114_read(&BARO_ABS_ADS);
}
void baro_downlink_raw( void )
{
DOWNLINK_SEND_BARO_RAW(DefaultChannel, DefaultDevice,&baro.absolute,&baro.differential);
}
-2
View File
@@ -46,8 +46,6 @@ extern float baro_alt_offset;
#define BaroAltHandler() { baro_alt = BARO_SENS*(baro_alt_offset - (float)baro.absolute); }
#endif
extern void baro_downlink_raw( void );
#define BARO_ABS_ADS ads1114_1
#define BaroAbs(_ads, _handler) { \
@@ -239,6 +239,16 @@ extern uint8_t telemetry_mode_Ap_DefaultChannel;
#define PERIODIC_SEND_SCP_STATUS(_trans, _dev) {}
#endif
#ifdef BOARD_HAS_BARO
#define PERIODIC_SEND_BARO_RAW(_chan) { \
DOWNLINK_SEND_BARO_RAW(_chan, \
&baro.absolute, \
&baro.differential); \
}
#else
#define PERIODIC_SEND_BARO_RAW(_chan) {}
#endif
#ifdef MEASURE_AIRSPEED
#define PERIODIC_SEND_AIRSPEED(_trans, _dev) DOWNLINK_SEND_AIRSPEED (_trans, _dev, &estimator_airspeed, &estimator_airspeed, &estimator_airspeed, &estimator_airspeed)
#elif USE_AIRSPEED
+4 -14
View File
@@ -174,23 +174,13 @@ extern uint8_t telemetry_mode_Main_DefaultChannel;
&imu.mag_unscaled.z); \
}
/* FIXME: make that depend on board */
#define PERIODIC_SEND_BOOZ_BARO_RAW(_trans, _dev) { \
DOWNLINK_SEND_BOOZ2_BARO_RAW(_trans, _dev, \
&baro_board.offset, \
&baro.absolute, \
&baro_board.value_filtered); \
#define PERIODIC_SEND_BARO_RAW(_trans, _dev) { \
DOWNLINK_SEND_BARO_RAW(_trans, _dev, \
&baro.absolute, \
&baro.differential); \
}
#define PERIODIC_SEND_BARO_RAW(_trans, _dev) { \
DOWNLINK_SEND_BARO_RAW(_trans, _dev, \
&baro.absolute, \
&baro.differential); \
}
#include "firmwares/rotorcraft/stabilization.h"
#define PERIODIC_SEND_RATE_LOOP(_trans, _dev) { \