mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 05:33:34 +08:00
IMU drivers using FIFOs increase max length to 16 and sync similar implementations
- this provides some extra space when the FIFO transfers don't align perfectly - I've also made an effort to keep the different drivers (icm20602, icm20608g, ism330ldc) in sync so we can factor out the common portions later once we've confident in the pattern.
This commit is contained in:
@@ -76,9 +76,9 @@ public:
|
||||
uint8_t samples; // number of samples
|
||||
float dt; // in microseconds
|
||||
|
||||
int16_t x[8];
|
||||
int16_t y[8];
|
||||
int16_t z[8];
|
||||
int16_t x[16];
|
||||
int16_t y[16];
|
||||
int16_t z[16];
|
||||
};
|
||||
static_assert(sizeof(FIFOSample::x) == sizeof(sensor_accel_fifo_s::x), "FIFOSample.x invalid size");
|
||||
static_assert(sizeof(FIFOSample::y) == sizeof(sensor_accel_fifo_s::y), "FIFOSample.y invalid size");
|
||||
|
||||
@@ -77,9 +77,9 @@ public:
|
||||
uint8_t samples; // number of samples
|
||||
float dt; // in microseconds
|
||||
|
||||
int16_t x[8];
|
||||
int16_t y[8];
|
||||
int16_t z[8];
|
||||
int16_t x[16];
|
||||
int16_t y[16];
|
||||
int16_t z[16];
|
||||
};
|
||||
static_assert(sizeof(FIFOSample::x) == sizeof(sensor_gyro_fifo_s::x), "FIFOSample.x invalid size");
|
||||
static_assert(sizeof(FIFOSample::y) == sizeof(sensor_gyro_fifo_s::y), "FIFOSample.y invalid size");
|
||||
|
||||
Reference in New Issue
Block a user