mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
Accel: Move to generated uORB topics
This commit is contained in:
13
msg/sensor_accel.msg
Normal file
13
msg/sensor_accel.msg
Normal 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
|
||||
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user