forked from Archive/PX4-Autopilot
Mag: move to generated uORB topics
This commit is contained in:
parent
1d1431e532
commit
36a787bd91
|
@ -0,0 +1,12 @@
|
|||
uint64 timestamp
|
||||
uint64 error_count
|
||||
float32 x
|
||||
float32 y
|
||||
float32 z
|
||||
float32 range_ga
|
||||
float32 scaling
|
||||
float32 temperature
|
||||
|
||||
int16 x_raw
|
||||
int16 y_raw
|
||||
int16 z_raw
|
|
@ -49,26 +49,8 @@
|
|||
#define MAG1_DEVICE_PATH "/dev/mag1"
|
||||
#define MAG2_DEVICE_PATH "/dev/mag2"
|
||||
|
||||
/**
|
||||
* mag report structure. Reads from the device must be in multiples of this
|
||||
* structure.
|
||||
*
|
||||
* Output values are in gauss.
|
||||
*/
|
||||
struct mag_report {
|
||||
uint64_t timestamp;
|
||||
uint64_t error_count;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
float range_ga;
|
||||
float scaling;
|
||||
float temperature;
|
||||
|
||||
int16_t x_raw;
|
||||
int16_t y_raw;
|
||||
int16_t z_raw;
|
||||
};
|
||||
#include <uOrb/topics/sensor_mag.h>
|
||||
#define mag_report sensor_mag_s
|
||||
|
||||
/** mag scaling factors; Vout = (Vin * Vscale) + Voffset */
|
||||
struct mag_scale {
|
||||
|
@ -80,12 +62,6 @@ struct mag_scale {
|
|||
float z_scale;
|
||||
};
|
||||
|
||||
/*
|
||||
* ObjDev tag for raw magnetometer data.
|
||||
*/
|
||||
ORB_DECLARE(sensor_mag);
|
||||
|
||||
|
||||
/*
|
||||
* ioctl() definitions
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue