mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-20 19:36:19 +08:00
increase adxl345 range from +-2g to +-16g for aspirin driver
- as the full resolution bit is set the LSB/g sensitivity stays the same - this changes the output resolution from 10 to 13 bit
This commit is contained in:
@@ -101,8 +101,8 @@ static void configure_accel(void) {
|
||||
adxl345_write_to_reg(ADXL345_REG_POWER_CTL, 1<<3);
|
||||
/* enable data ready interrupt */
|
||||
adxl345_write_to_reg(ADXL345_REG_INT_ENABLE, 1<<7);
|
||||
/* Enable full res and interrupt active low */
|
||||
adxl345_write_to_reg(ADXL345_REG_DATA_FORMAT, 1<<3|1<<5);
|
||||
/* Enable full res with +-16g range and interrupt active low */
|
||||
adxl345_write_to_reg(ADXL345_REG_DATA_FORMAT, 1<<0|1<<1|1<<3|1<<5);
|
||||
/* clear spi rx reg to make DMA happy */
|
||||
adxl345_clear_rx_buf();
|
||||
/* reads data once to bring interrupt line up */
|
||||
|
||||
Reference in New Issue
Block a user