41 _sensor_mag_pub{
ORB_ID(sensor_mag), priority},
130 report.
x = val_calibrated(0);
131 report.
y = val_calibrated(1);
132 report.
z = val_calibrated(2);
#define MAGIOCGSCALE
copy the mag scaling constants to the structure pointed to by (arg)
void set_device_type(uint8_t devtype)
virtual int register_class_devname(const char *class_devname)
Register a class device name, automatically adding device class instance suffix if need be...
__EXPORT void rotate_3f(enum Rotation rot, float &x, float &y, float &z)
rotate a 3 element float vector in-place
mag scaling factors; Vout = (Vin * Vscale) + Voffset
matrix::Vector3f _calibration_scale
int _class_device_instance
static int32_t device_id[max_accel_sens]
struct DeviceStructure devid_s
virtual void poll_notify(pollevent_t events)
Report new poll events.
Definitions for the generic base classes in the device framework.
uORB::PublicationMultiData< sensor_mag_s > _sensor_mag_pub
#define ORB_ID(_name)
Generates a pointer to the uORB metadata structure for a given topic.
#define MAGIOCSSCALE
set the mag scaling constants to the structure pointed to by (arg)
#define MAG_BASE_DEVICE_PATH
virtual int unregister_class_devname(const char *class_devname, unsigned class_instance)
Register a class device name, automatically adding device class instance suffix if need be...
void update(hrt_abstime timestamp, int16_t x, int16_t y, int16_t z)
Rotation
Enum for board and external compass rotations.
matrix::Vector3f _sensitivity
matrix::Vector3f _calibration_offset
int ioctl(cdev::file_t *filp, int cmd, unsigned long arg) override
Perform an ioctl operation on the device.
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
~PX4Magnetometer() override
PX4Magnetometer(uint32_t device_id, uint8_t priority, enum Rotation rotation)