Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/drivers/imu/bosch/bmi270/BMI270.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,8 @@ void BMI270::ConfigureFIFOWatermark(uint8_t samples)
{
// FIFO_WTM: 13 bit FIFO watermark level value
// unit of the fifo watermark is one byte
const uint16_t fifo_watermark_threshold = samples * sizeof(FIFO::Data);
// each combined accel+gyro frame is 1 header byte + 6 gyro bytes + 6 accel bytes
const uint16_t fifo_watermark_threshold = samples * (2 * sizeof(FIFO::Data) + FIFO::HEADER_SIZE);

for (auto &r : _register_cfg) {
if (r.reg == Register::FIFO_WTM_0) {
Expand Down
1 change: 1 addition & 0 deletions src/drivers/imu/bosch/bmi270/Bosch_BMI270_registers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ enum ACC_PWR_CTRL_BIT : uint8_t {
namespace FIFO
{
static constexpr size_t SIZE = 1024;
static constexpr size_t HEADER_SIZE = 1; // one header byte precedes each accel+gyro frame

struct Data {
uint8_t x_lsb;
Expand Down
Loading