Andrew Tridgell
875274e761
AP_InertialSensor: added support for ICM-20602
...
treat the same as a 20608
8 years ago
Andrew Tridgell
b86513f503
AP_InertialSensor: support AUAV21 board
8 years ago
Lucas De Marchi
2d50eb312c
AP_InertialSensor: add support to MPU6500
...
Just like and MPU9250 without mag and with different WHOAMI register.
8 years ago
murata
a3f5b4f319
AP_InertialSensor: Change from magic number 0 to definition name.
8 years ago
Lucas De Marchi
9535b45cc9
AP_InertialSensor: examples: fix double to float warnings
...
While at it add function prototype.
8 years ago
Andrew Tridgell
01da36295d
AP_InertialSensor: support the L3GD20H gyro
...
this is used by the MRo Pixhawk1
8 years ago
murata
0733d760f6
AP_HAL_VRBRAIN: Unify from print or println to printf.
...
AP_InertialSensor: Unify from print or printin to printf.
8 years ago
murata
2643e7e906
AP_InertialSensor: Unify from print or println to printf.
8 years ago
Julien Beraud
3d9dacb227
AP_InertialSensor: push gyro data for opticalflow
...
Do it only if there is an optical flow in the current HAL
8 years ago
Lucas De Marchi
5472bc4de1
Global: change Device::PeriodicCb signature
...
Remove bool return as it's never being used and not supported on PX4.
8 years ago
mirkix
62fabca19d
AP_InertialSensor: Enable I2C bypass for MPU9250 conntected via I2C to access internal AK8963
8 years ago
Randy Mackay
946d30476a
AP_InertialSensor: fix whoami for MPU6k
8 years ago
murata
d56bad781f
AP_InertialSensor: change if statements to switch statement
...
No functional change
8 years ago
murata
398b7b83dd
AP_InertialSensor: minor formatting fixes
...
No functional change
8 years ago
Lucas De Marchi
9569ed94a9
AP_InertialSensor: Invensense: use capital letters for define
8 years ago
Andrew Tridgell
a30745903a
AP_InertialSensor: use ACC2_BIAS
8 years ago
priseborough
60ebe97e10
AP_InertialSensor: remove unused EKF1 include
8 years ago
Andrew Tridgell
65b9b86099
AP_InertialSensor: unify MPU6000 and MPU9250 drivers
...
make a single AP_InertialSensor_Invensense driver. This avoids a lot
of duplication and will save time as new varients are added
8 years ago
Pierre Kancir
de05e6ba29
InertialSensor : MPU9250 utilize an explicit type cast to avoid the loss of a fractional part
8 years ago
Pierre Kancir
13c16e187f
InertialSensor: MPU6000 utilize an explicit type cast to avoid the loss of a fractional part
8 years ago
Randy Mackay
dfd58cc57b
AP_InertialSensor: fix build warning for MPU9250
8 years ago
Randy Mackay
699279ed1f
AP_InertialSensor: fix build warning for MPU6000
8 years ago
Andrew Tridgell
f9845c93b1
AP_InertialSensor: keep transfers nicely setup for DMA on stm32
...
this avoids using stack based bounce buffers which may not support DMA
on stm32
8 years ago
Andrew Tridgell
771cedca3d
AP_InertialSensor: reduced number of SPI transfers
...
use cached copy of temperature in MPU6000 and MPU9250 to detect FIFO
error when possible
8 years ago
Andrew Tridgell
27605b0258
AP_InertialSensor: run invensese reg checking at low speed
...
config register read/write should be at low bus speed.
also change to check every 20 calls to reduce checking cost
8 years ago
Andrew Tridgell
0f984290c3
AP_InertialSensor: enable fast sampling by default on some boards
8 years ago
Andrew Tridgell
f3a778f980
AP_InertialSensor: fixed freeing of fifo buffer
8 years ago
Andrew Tridgell
6f28c61c8d
AP_InertialSensor: changed SIZE to LEN
...
thanks to Lucas for suggestion
8 years ago
hiro2233
cb7f46d653
AP_InertialSensor: fixed handling of user_ctrl register
...
with aux bus implementations
8 years ago
Andrew Tridgell
9b4c588c09
AP_InertialSensor: adapt drivers for SPI-DMA capable systems
...
no longer need accumulate() transfers with SPI enabled DMA on stm32
8 years ago
Andrew Tridgell
28daddaaf2
AP_InertialSensor: don't use accumulate approach on Linux or I2C
8 years ago
Andrew Tridgell
d9c8db7024
AP_InertialSensor: implement a new strategy for fast sampling
...
this moves to using a 1p filter on the high rate data, followed by
averaging down to 1kHz then a 2p filter to apply configured cutoff
frequency.
It also fixes the FIFO reset to not cause data corruption. We need to
disable all FIFO channels before doing the reset, and wait for the
FIFO to stop in the sensor.
Finally it moves sampling of the MPU6000 and MPU9250 into the main
thread. That significantly improves scheduling performance as we no
longer get long FIFO SPI transfers happening during other tasks. All
transfers happen at the start of the fast loop. That makes timing much
more predictable.
Thanks to Leonard and Paul for help with this design!
8 years ago
Lucas De Marchi
87c6d5da13
AP_InertialSensor: replace panic() with return
...
When blocking forever there's no reason to call panic later since it
will never going to be reached. This reduces binary size in a few bytes
since the message isn't required anymore.
8 years ago
Andrew Tridgell
6129b1abb6
AP_InertialSensor: wait forever for semaphore on startup
...
some boards take a silly amount of time to get semaphore on startup
8 years ago
Andrew Tridgell
216cf53922
AP_InertialSensor: handle FIFO overflow for MPU6k and 9250
...
this prevents temporary corruption of INS data on FIFO overflow
8 years ago
Andrew Tridgell
18d4286166
AP_InertialSensor: fixed pixfalcon 9250 detection
8 years ago
Andrew Tridgell
cb1a5d4c74
AP_InertialSensor: take semaphore for update of accumulators
...
this fixes a race in update of delta angle and delta velocity between
backend and frontend
8 years ago
Andrew Tridgell
f3f1f6b0b6
AP_InertialSensor: fixed gyro orientation on l3gd20H on pixhawk
8 years ago
Andrew Tridgell
6af00027ab
AP_InertialSensor: removed unused variables
...
thanks to Francisco for noticing
8 years ago
Francisco Ferreira
bfbb275577
AP_InertialSensor: on accel cal failure don't save values to zero
...
When the accel calibration fails leave the previous values saved but set them to defaults (scale default is ones, not zeros) and notify the GCS
This fixes an arithmetic exception when doing a second accel cal after the first one failed
8 years ago
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
8d19808152
AP_InertialSensor: fixed missing checked register goto
...
thanks to Francisco for spotting
8 years ago
Andrew Tridgell
49856c37f2
AP_InertialSensor: reduce checked register count
...
thanks to Francisco for spotting this
8 years ago
Andrew Tridgell
4be8f05ad4
AP_InertialSensor: added register checking for LSM9DS0
8 years ago
Andrew Tridgell
77a83c091a
AP_InertialSensor: added register checking for MPU6000/ICM20608
8 years ago
Andrew Tridgell
95a849f472
AP_InertialSensor: added register checking for MPU9250
8 years ago
Andrew Tridgell
3289e90134
AP_InertialSensor: added error count increments in drivers
8 years ago
Andrew Tridgell
4ebf3309f7
AP_InertialSensor: auto-handle invensense sensor changes
...
some boards swap out MPU6000 for MPU9250 or ICM20608
8 years ago