Andrew Tridgell
624178f3be
AP_InertialSensor: added INS_FAST_SAMPLE parameter
...
this allows enable/disable of fast sampling per IMU, making
experimentation easier.
It also fixes the fast sampling to always average over 8 samples, and
fixes the 9250 to use the correct accumulator when not doing fast
sampling
8 years ago
Andrew Tridgell
c0303ffe8a
AP_InertialSensor: temporarily disable fast sampling
...
a problem has been found with the filtering with fast sampling on
ICM-20608 and MPU9250. Disable until it is solved.
8 years ago
Andrew Tridgell
c794ad9ee8
AP_InertialSensor: use smaller FIFO buffers
...
this allows for reading multiple chunks from the fifo per callback
8 years ago
Andrew Tridgell
77a83c091a
AP_InertialSensor: added register checking for MPU6000/ICM20608
8 years ago
Andrew Tridgell
af0ec41652
AP_InertialSensor: fixed accel clip detection with fast sampling
...
we need to check on every sample at the full rate
8 years ago
Andrew Tridgell
8da42b7a8b
AP_InertialSensor: fixed temperature for fast sampling case
8 years ago
Andrew Tridgell
e27a76e460
AP_InertialSensor: fixed auxiliary bus with FIFO enabled
...
make sure fifo reset doesn't check I2C master enable
8 years ago
Andrew Tridgell
46785e8ecf
AP_InertialSensor: improved method for FIFO integrity checking
...
check temperature every 255 samples against FIFO data
8 years ago
Andrew Tridgell
d2f6a514b9
AP_InertialSensor: catch FIFO alignment errors using temperature reading
...
Two cases of what seems to be FIFO alignment errors have been seen on
a Pixracer-beta board with a ICM-20608. At a cost of 2 extra bytes per
transfer we can catch these by looking for sudden temperature changes
caused by bad data in the temperature registers.
8 years ago
Andrew Tridgell
d248b33104
AP_InertialSensor: simplify config of MPU6000
...
use zero sample rate divider on both MPU6000 and ICM20608
8 years ago
Andrew Tridgell
84c3e29891
AP_InertialSensor: use AP_HAL rotations for MPU6000
8 years ago
Andrew Tridgell
2f01dfe81c
AP_InertialSensor: fixed from review by Lucas
8 years ago
Andrew Tridgell
81b933d9d0
AP_InertialSensor: use int32_t summation for fast sampling
...
very slightly faster
8 years ago
Andrew Tridgell
af1c5fd6d3
AP_InertialSensor: always use FIFO on MPU6000
...
and enable fast sampling on ICM20608 if on SPI
8 years ago
Andrew Tridgell
a9a5e50bd1
AP_InertialSensor: removed timer callback for MPU6000
...
Thanks to Lucas for pointing out this is not needed
8 years ago
Andrew Tridgell
bd84e592f8
AP_InertialSensor: check for NULL device pointer in probe()
...
handle missing devices
8 years ago
Andrew Tridgell
3d7d773883
AP_InertialSensor: added support for ICM20608 on Pixracer
8 years ago
Andrew Tridgell
aa4025bdf9
AP_InertialSensor: make INS sensor IDs match for PX4
...
in-tree driver IDs now match PX4Firmware driver IDs on Pixhawk2
8 years ago
Andrew Tridgell
9e7e1b2f01
AP_InertialSensor: fixed merge conflicts with patches from Lucas
8 years ago
Lucas De Marchi
104e29acf2
AP_InertialSensor: MPU6000: change accel scale to 16G
...
Also change the ID of MPU6000 so previous calibration values are not
considered valid.
8 years ago
Lucas De Marchi
dc09661b9e
AP_InertialSensor: MPU6000: save driver version
...
When registering accel and gyro we use the upper 16bits of the id to
store the driver version. When changing the driver behavior in
non-compatible ways, changing this version will trigger a request for
calibration.
8 years ago
Lucas De Marchi
0d3adef8b2
AP_InertialSensor: MPU6000: remove TODO leftover
...
This will never be done as blindly changing speed is not the way to fix
communication issues.
8 years ago
Lucas De Marchi
469efb00f6
AP_InertialSensor: save id for gyro and accel instances
...
This allows each sensor to be uniquely identified in the system by using
either the index inside the backend or for those that use the Device
interface, to use the bus type, location, and device id.
We leave 16-bit for each sensor to be able to change its own
identification in future, which allows them to be changed in an
incompatible manner forcing a re-calibration.
8 years ago
Lucas De Marchi
ace61087a1
AP_InertialSensor: remove product_id
...
We only leave the parameter there for backward-compatibility. However
product id on the inertial sensor is not much useful since it's only
kept for the first instance.
A better implementation per-gyro and per-accel is needed in order to
avoid problems with sensors taking the offsets configured for another
sensor.
8 years ago
Andrew Tridgell
64a5d3938c
AP_InertialSensor: implement device IDs for MPU6000 and MPU9250 AuxilaryBus
8 years ago
Andrew Tridgell
a5c5e033d2
AP_InertialSensor: fixed threading and locking in remaining backends
...
use a backend semaphore for shared data and use thread per bus where
available
8 years ago
Andrew Tridgell
2df6ed08c2
AP_InertialSensor: added optional per-instance orientation
...
this is needed for multi-sensor boards to get orientation right for
each sensor
8 years ago
Andrew Tridgell
919aa61918
AP_InertialSensor: support AuxiliaryBus without register_periodic_callback()
8 years ago
Andrew Tridgell
2b66df68a1
AP_InertialSensor: use thread-per-bus for lsm303d and mpu6000
8 years ago
Mathieu OTHACEHE
152edf7189
Global: remove mode line from headers
...
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
8 years ago
Julien Beraud
714c8fd318
AP_InertialSensor_MPU6000: Add support for fsync bit for Bebop
...
Already present on Disco
9 years ago
Andrew Tridgell
6f9530ebaa
AP_InertialSensor: added optional FSYNC external sync bit
...
used to synchronise with image sensor on Disco
9 years ago
Murilo Belluzzo
36bdd7f1f1
AP_InertialSensor: MPU6000: Add missing read() check
9 years ago
Andrew Tridgell
d30e55fa44
AP_InertialSensor: initial support for Disco
...
setup right orientation
9 years ago
Andrew Tridgell
834acaffee
AP_InertialSensor: provide IMU temperature to HAL for all boards
9 years ago
Lucas De Marchi
1f96336f7c
Global: rename bus type enum entries
9 years ago
Gustavo Jose de Sousa
a6e5eb9e14
AP_InertialSensor: MPU6000: remove _bus_type field
...
Use _dev->bus_type instead.
9 years ago
Gustavo Jose de Sousa
0718649c8b
AP_InertialSensor: MPU6000: let Device handle read flag
...
There's no need to handle that in MPU6000 anymore.
9 years ago
Gustavo Jose de Sousa
309fe4a88c
AP_InertialSensor: MPU6000: remove _register_write_check()
...
That function isn't used in the code base and there should be a better way to
debug writes on registers.
9 years ago
Lucas De Marchi
057822b51c
AP_InertialSensor: AuxiliaryBus: fix return value
...
We should return the number of bytes written/read, not 0 on success.
This number may be useful in some cases so return it.
While at it fix a simple wrong space in the header.
9 years ago
Lucas De Marchi
af846636e4
AP_InertialSensor: MPU60x0: use AP_HAL::Device abstraction
9 years ago
Lucas De Marchi
5088dca072
AP_InertialSensor: MPU60x0: coding style fixes
9 years ago
Lucas De Marchi
ed653f8dbb
AP_InertialSensor: MPU60x0: add comment about 8G/16G
9 years ago
Aaron Wang Shi
3a31970056
AP_InertialSensor: add support to BH hat
...
- MPU6050 I2C for BH v0.1
- MPU9250 SPI for BH v0.2
9 years ago
Julien BERAUD
a27d7f8a93
AP_InertialSensor_MPU6000: Fix FIFO reset
...
Change the sequence. Previous sequence was sometimes causing failure
to initialize the IMU.
9 years ago
Caio Marcelo de Oliveira Filho
d7601095fa
AP_InertialSensor: use millis/micros/panic functions
9 years ago
Andrew Tridgell
75ea8f3dc0
AP_InertialSensor: removed "have sample" logic from drivers
...
the frontend has all the information it needs, so we can simplify the
drivers some more
9 years ago
Andrew Tridgell
0e4bab74ba
AP_InertialSensor: simplify sensor backends
...
use common code for filtering and update, allowing each sensor driver
to be simpler and more consistent
9 years ago
Lucas De Marchi
3142f21363
AP_InertialSensor: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1
9 years ago
Gustavo Jose de Sousa
8e351a058d
AP_InertialSensor: MPU6000: enable data-ready pin for minlure
...
Data-ready pin wasn't being used before due to a bug in the Kernel with
concurrent accesses to GPIO in Intel Baytrail platforms. That has been fixed in
Kernel version 4.2.
9 years ago