InvenSense MPU9250 move to PX4Accelerometer and PX4Gyroscope helpers

This commit is contained in:
Daniel Agar
2019-05-31 21:43:30 -04:00
parent cd45d8fc68
commit 32fb2bae8c
15 changed files with 134 additions and 1214 deletions
@@ -55,6 +55,7 @@ public:
void set_scale(float scale) { _sensor_mag_pub.get().scaling = scale; }
void set_temperature(float temperature) { _sensor_mag_pub.get().temperature = temperature; }
void set_external(bool external) { _sensor_mag_pub.get().is_external = external; }
void set_sensitivity(float x, float y, float z) { _sensitivity = matrix::Vector3f{x, y, z}; }
void update(hrt_abstime timestamp, int16_t x, int16_t y, int16_t z);
@@ -69,6 +70,8 @@ private:
matrix::Vector3f _calibration_scale{1.0f, 1.0f, 1.0f};
matrix::Vector3f _calibration_offset{0.0f, 0.0f, 0.0f};
matrix::Vector3f _sensitivity{1.0f, 1.0f, 1.0f};
int _class_device_instance{-1};
};