mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 04:23:33 +08:00
Merged commit disabling FIFO in L3GD20
This commit is contained in:
committed by
Lorenz Meier
parent
2c24888d6d
commit
547a747752
@@ -333,8 +333,13 @@ L3GD20::init()
|
|||||||
write_reg(ADDR_CTRL_REG4, REG4_BDU);
|
write_reg(ADDR_CTRL_REG4, REG4_BDU);
|
||||||
write_reg(ADDR_CTRL_REG5, 0);
|
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 */
|
write_reg(ADDR_CTRL_REG5, REG5_FIFO_ENABLE); /* disable wake-on-interrupt */
|
||||||
|
|
||||||
|
/* 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(500); /* default to 500dps */
|
set_range(500); /* default to 500dps */
|
||||||
set_samplerate(0); /* max sample rate */
|
set_samplerate(0); /* max sample rate */
|
||||||
|
|||||||
Reference in New Issue
Block a user