Skip to content

Commit

Permalink
Merge pull request #11 from Kubuxu/misc/comment-cleanup
Browse files Browse the repository at this point in the history
Fix missing word in comment, switch to constexpr
  • Loading branch information
l0ud authored Jun 5, 2024
2 parents 73d80b8 + 6ac4e83 commit 0111adf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sensors/softfusion/drivers/lsm6ds-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ struct LSM6DSOutputHandler

template <typename AccelCall, typename GyroCall, typename Regs>
void bulkRead(AccelCall &processAccelSample, GyroCall &processGyroSample, float GyrTs, float AccTs) {
const auto FIFO_SAMPLES_MASK = 0x3ff;
const auto FIFO_OVERRUN_LATCHED_MASK = 0x800;
constexpr auto FIFO_SAMPLES_MASK = 0x3ff;
constexpr auto FIFO_OVERRUN_LATCHED_MASK = 0x800;

const auto fifo_status = i2c.readReg16(Regs::FifoStatus);
const auto available_axes = fifo_status & FIFO_SAMPLES_MASK;
const auto fifo_bytes = available_axes * FullFifoEntrySize;
if (fifo_status & FIFO_OVERRUN_LATCHED_MASK) {
// FIFO is expected to happen during startup and calibration
// FIFO overrun is expected to happen during startup and calibration
logger.error("FIFO OVERRUN! This occuring during normal usage is an issue.");
}

Expand Down

0 comments on commit 0111adf

Please sign in to comment.