mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 04:53:34 +08:00
Accel: Move to generated uORB topics
This commit is contained in:
+2
-24
@@ -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