mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 20:28:37 +08:00
Accel: Move to generated uORB topics
This commit is contained in:
@@ -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
|
||||||
+2
-24
@@ -51,25 +51,8 @@
|
|||||||
#define ACCEL1_DEVICE_PATH "/dev/accel1"
|
#define ACCEL1_DEVICE_PATH "/dev/accel1"
|
||||||
#define ACCEL2_DEVICE_PATH "/dev/accel2"
|
#define ACCEL2_DEVICE_PATH "/dev/accel2"
|
||||||
|
|
||||||
/**
|
#include <uOrb/topics/sensor_accel.h>
|
||||||
* accel report structure. Reads from the device must be in multiples of this
|
#define accel_report sensor_accel_s
|
||||||
* 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;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** accel scaling factors; Vout = Vscale * (Vin + Voffset) */
|
/** accel scaling factors; Vout = Vscale * (Vin + Voffset) */
|
||||||
struct accel_scale {
|
struct accel_scale {
|
||||||
@@ -81,11 +64,6 @@ struct accel_scale {
|
|||||||
float z_scale;
|
float z_scale;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* ObjDev tag for raw accelerometer data.
|
|
||||||
*/
|
|
||||||
ORB_DECLARE(sensor_accel);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ioctl() definitions
|
* ioctl() definitions
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user