Accel: Move to generated uORB topics

This commit is contained in:
Lorenz Meier
2015-08-20 10:18:10 +02:00
parent a4e06654ff
commit 33a1e3127a
2 changed files with 15 additions and 24 deletions

13
msg/sensor_accel.msg Normal file
View File

@@ -0,0 +1,13 @@
uint64 timestamp
uint64 error_count
float32 x # acceleration in the NED X board axis in m/s^2
float32 y # acceleration in the NED Y board axis in m/s^2
float32 z # acceleration in the NED Z board axis in m/s^2
float32 temperature # temperature in degrees celsius
float32 range_m_s2 # range in m/s^2 (+- this value)
float32 scaling
int16 x_raw
int16 y_raw
int16 z_raw
int16 temperature_raw

View File

@@ -51,25 +51,8 @@
#define ACCEL1_DEVICE_PATH "/dev/accel1"
#define ACCEL2_DEVICE_PATH "/dev/accel2"
/**
* accel report structure. Reads from the device must be in multiples of this
* structure.
*/
struct accel_report {
uint64_t timestamp;
uint64_t error_count;
float x; /**< acceleration in the NED X board axis in m/s^2 */
float y; /**< acceleration in the NED Y board axis in m/s^2 */
float z; /**< acceleration in the NED Z board axis in m/s^2 */
float temperature; /**< temperature in degrees celsius */
float range_m_s2; /**< range in m/s^2 (+- this value) */
float scaling;
int16_t x_raw;
int16_t y_raw;
int16_t z_raw;
int16_t temperature_raw;
};
#include <uOrb/topics/sensor_accel.h>
#define accel_report sensor_accel_s
/** accel scaling factors; Vout = Vscale * (Vin + Voffset) */
struct accel_scale {
@@ -81,11 +64,6 @@ struct accel_scale {
float z_scale;
};
/*
* ObjDev tag for raw accelerometer data.
*/
ORB_DECLARE(sensor_accel);
/*
* ioctl() definitions
*