mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 10:46:33 +08:00
gyro: Move to generated uORB topics
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
uint64 timestamp
|
||||||
|
uint64 error_count
|
||||||
|
float32 x # angular velocity in the NED X board axis in rad/s
|
||||||
|
float32 y # angular velocity in the NED Y board axis in rad/s
|
||||||
|
float32 z # angular velocity in the NED Z board axis in rad/s
|
||||||
|
float32 temperature # temperature in degrees celcius
|
||||||
|
float32 range_rad_s
|
||||||
|
float32 scaling
|
||||||
|
|
||||||
|
int16 x_raw
|
||||||
|
int16 y_raw
|
||||||
|
int16 z_raw
|
||||||
|
int16 temperature_raw
|
||||||
+2
-24
@@ -51,25 +51,8 @@
|
|||||||
#define GYRO1_DEVICE_PATH "/dev/gyro1"
|
#define GYRO1_DEVICE_PATH "/dev/gyro1"
|
||||||
#define GYRO2_DEVICE_PATH "/dev/gyro2"
|
#define GYRO2_DEVICE_PATH "/dev/gyro2"
|
||||||
|
|
||||||
/**
|
#include <uOrb/topics/sensor_gyro.h>
|
||||||
* gyro report structure. Reads from the device must be in multiples of this
|
#define gyro_report sensor_gyro_s
|
||||||
* structure.
|
|
||||||
*/
|
|
||||||
struct gyro_report {
|
|
||||||
uint64_t timestamp;
|
|
||||||
uint64_t error_count;
|
|
||||||
float x; /**< angular velocity in the NED X board axis in rad/s */
|
|
||||||
float y; /**< angular velocity in the NED Y board axis in rad/s */
|
|
||||||
float z; /**< angular velocity in the NED Z board axis in rad/s */
|
|
||||||
float temperature; /**< temperature in degrees celcius */
|
|
||||||
float range_rad_s;
|
|
||||||
float scaling;
|
|
||||||
|
|
||||||
int16_t x_raw;
|
|
||||||
int16_t y_raw;
|
|
||||||
int16_t z_raw;
|
|
||||||
int16_t temperature_raw;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** gyro scaling factors; Vout = (Vin * Vscale) + Voffset */
|
/** gyro scaling factors; Vout = (Vin * Vscale) + Voffset */
|
||||||
struct gyro_scale {
|
struct gyro_scale {
|
||||||
@@ -81,11 +64,6 @@ struct gyro_scale {
|
|||||||
float z_scale;
|
float z_scale;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* ObjDev tag for raw gyro data.
|
|
||||||
*/
|
|
||||||
ORB_DECLARE(sensor_gyro);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ioctl() definitions
|
* ioctl() definitions
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user