forked from Archive/PX4-Autopilot
l3gd20: disable the FIFO
the FIFO was not gaining us anything, and was adding latency. If we use the FIFO we'd need to do multiple SPI transfers to ensure it is drained
This commit is contained in:
parent
c84cdf2ff6
commit
83189a85da
|
@ -342,7 +342,11 @@ L3GD20::init()
|
|||
write_reg(ADDR_CTRL_REG5, 0);
|
||||
|
||||
write_reg(ADDR_CTRL_REG5, REG5_FIFO_ENABLE); /* disable wake-on-interrupt */
|
||||
write_reg(ADDR_FIFO_CTRL_REG, FIFO_CTRL_STREAM_MODE); /* Enable FIFO, old data is overwritten */
|
||||
|
||||
/* disable FIFO. This makes things simpler and ensures we
|
||||
* aren't getting stale data. It means we must run the hrt
|
||||
* callback fast enough to not miss data. */
|
||||
write_reg(ADDR_FIFO_CTRL_REG, FIFO_CTRL_BYPASS_MODE);
|
||||
|
||||
set_range(2000); /* default to 2000dps */
|
||||
set_samplerate(0); /* max sample rate */
|
||||
|
|
Loading…
Reference in New Issue