38 #include <lib/cdev/CDev.hpp> 44 #include <uORB/topics/sensor_gyro.h> 55 void set_device_type(uint8_t devtype);
56 void set_error_count(uint64_t error_count) { _sensor_gyro_pub.get().error_count = error_count; }
57 void set_scale(
float scale) { _sensor_gyro_pub.get().scaling = scale; }
58 void set_temperature(
float temperature) { _sensor_gyro_pub.get().temperature = temperature; }
60 void set_sample_rate(
unsigned rate) { _sample_rate = rate; }
62 void configure_filter(
float cutoff_freq) { _filter.set_cutoff_frequency(_sample_rate, cutoff_freq); }
64 void update(
hrt_abstime timestamp, int16_t x, int16_t y, int16_t z);
77 matrix::Vector3f _calibration_scale{1.0f, 1.0f, 1.0f};
78 matrix::Vector3f _calibration_offset{0.0f, 0.0f, 0.0f};
80 int _class_device_instance{-1};
82 unsigned _sample_rate{1000};
Gyroscope driver interface.
Definition: LowPassFilter2pVector3f.hpp:44
Definition: PX4Gyroscope.hpp:46
High-resolution timer with callouts and timekeeping.
Definition: integrator.h:48
Rotation
Enum for board and external compass rotations.
Definition: rotation.h:51
API for the uORB lightweight object broker.
A class to implement a second order low pass filter on a Vector3f Based on LowPassFilter2p.hpp by Leonard Hall LeonardTHall@gmail.com
Definition: px4_param.h:318
C++ base class for modules/classes using configuration parameters.
Definition: px4_module_params.h:46
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
Definition: drv_hrt.h:58
Definition: cdev_platform.hpp:20
int ioctl(cdev::file_t *filp, int cmd, unsigned long arg) override
Perform an ioctl operation on the device.
Definition: PX4Gyroscope.cpp:66
Abstract class for any character device.
Definition: CDev.hpp:58