uORB: Support up to three topics per sensor

This commit is contained in:
Lorenz Meier 2014-07-15 23:18:04 +02:00
parent 65367f7a99
commit 64e33b8896
2 changed files with 27 additions and 0 deletions

View File

@ -48,14 +48,17 @@
#include <drivers/drv_mag.h> #include <drivers/drv_mag.h>
ORB_DEFINE(sensor_mag0, struct mag_report); ORB_DEFINE(sensor_mag0, struct mag_report);
ORB_DEFINE(sensor_mag1, struct mag_report); ORB_DEFINE(sensor_mag1, struct mag_report);
ORB_DEFINE(sensor_mag2, struct mag_report);
#include <drivers/drv_accel.h> #include <drivers/drv_accel.h>
ORB_DEFINE(sensor_accel0, struct accel_report); ORB_DEFINE(sensor_accel0, struct accel_report);
ORB_DEFINE(sensor_accel1, struct accel_report); ORB_DEFINE(sensor_accel1, struct accel_report);
ORB_DEFINE(sensor_accel2, struct accel_report);
#include <drivers/drv_gyro.h> #include <drivers/drv_gyro.h>
ORB_DEFINE(sensor_gyro0, struct gyro_report); ORB_DEFINE(sensor_gyro0, struct gyro_report);
ORB_DEFINE(sensor_gyro1, struct gyro_report); ORB_DEFINE(sensor_gyro1, struct gyro_report);
ORB_DEFINE(sensor_gyro2, struct gyro_report);
#include <drivers/drv_baro.h> #include <drivers/drv_baro.h>
ORB_DEFINE(sensor_baro0, struct baro_report); ORB_DEFINE(sensor_baro0, struct baro_report);

View File

@ -95,6 +95,30 @@ struct sensor_combined_s {
float magnetometer_cuttoff_freq_hz; /**< Internal analog low pass frequency of sensor */ float magnetometer_cuttoff_freq_hz; /**< Internal analog low pass frequency of sensor */
uint64_t magnetometer_timestamp; /**< Magnetometer timestamp */ uint64_t magnetometer_timestamp; /**< Magnetometer timestamp */
int16_t gyro1_raw[3]; /**< Raw sensor values of angular velocity */
float gyro1_rad_s[3]; /**< Angular velocity in radian per seconds */
uint64_t gyro1_timestamp; /**< Gyro timestamp */
int16_t accelerometer1_raw[3]; /**< Raw acceleration in NED body frame */
float accelerometer1_m_s2[3]; /**< Acceleration in NED body frame, in m/s^2 */
uint64_t accelerometer1_timestamp; /**< Accelerometer timestamp */
int16_t magnetometer1_raw[3]; /**< Raw magnetic field in NED body frame */
float magnetometer1_ga[3]; /**< Magnetic field in NED body frame, in Gauss */
uint64_t magnetometer1_timestamp; /**< Magnetometer timestamp */
int16_t gyro2_raw[3]; /**< Raw sensor values of angular velocity */
float gyro2_rad_s[3]; /**< Angular velocity in radian per seconds */
uint64_t gyro2_timestamp; /**< Gyro timestamp */
int16_t accelerometer2_raw[3]; /**< Raw acceleration in NED body frame */
float accelerometer2_m_s2[3]; /**< Acceleration in NED body frame, in m/s^2 */
uint64_t accelerometer2_timestamp; /**< Accelerometer timestamp */
int16_t magnetometer2_raw[3]; /**< Raw magnetic field in NED body frame */
float magnetometer2_ga[3]; /**< Magnetic field in NED body frame, in Gauss */
uint64_t magnetometer2_timestamp; /**< Magnetometer timestamp */
float baro_pres_mbar; /**< Barometric pressure, already temp. comp. */ float baro_pres_mbar; /**< Barometric pressure, already temp. comp. */
float baro_alt_meter; /**< Altitude, already temp. comp. */ float baro_alt_meter; /**< Altitude, already temp. comp. */
float baro_temp_celcius; /**< Temperature in degrees celsius */ float baro_temp_celcius; /**< Temperature in degrees celsius */