mirkix
f82344358f
AP_InertialSensor: Change BBBMINI standard orientation
10 years ago
Staroselskii Georgii
d40b45c9ae
AP_InertialSensor: disable reset on MPU9250
...
The Compass library is initialized before the InertialSensor. AK8963 with
MPU9250 as backend already takes care of resetting MPU9250. The problem with
also resetting it in the MPU9250 initialization code is that if the reset
happens during an internal I2C transaction, the AK8963 may hang. So here we
remove the reset inside MPU9250. There still a possibility that the first
MPU9250 initialization is not successful and it resets the chip, but it's not
happening in tests.
10 years ago
Gustavo Jose de Sousa
c72dc9bd45
AP_InertialSensor: make single rotation on MPU9250
...
The previous implementation made some boards apply two rotations to suit
their default orientation. That was happening because there was an
unconditional rotation being done (commented as "rotate for bbone
default").
This commit makes that unconditional rotation as a default rotation
instead and adjusts the former additional rotations to be single
rotations.
10 years ago
Gustavo Jose de Sousa
3dad768e8b
AP_InertialSensor: log failure to initialize after max attempts on MPU9250
...
This happens for example when you are trying to use an SPI speed that's
above the one supported by the sensor or the controller.
10 years ago
Gustavo Jose de Sousa
587471ab54
AP_InertialSensor: disable I2C on MPU9250
...
As the datasheet says: "To prevent switching into I2C mode when using
SPI, the I2C interface should be disabled by setting the I2C_IF_DIS
configuration bit."
We also reset the sensor like PX4Firmware does for initializing the
MPU6000. See: ee1d8cd770/src/drivers/mpu6000/mpu6000.cpp (L695)
10 years ago
Lucas De Marchi
3aa46e3213
AP_InertialSensor: use functor macros
...
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
10 years ago
Andrew Tridgell
007b01533d
AP_InertialSensor: switched to 16g accel range for MPU9250
...
this matches the Pixhawk, and makes us less prone to vibration. We
have seen clipping at 8g
10 years ago
Andrew Tridgell
520c7c1306
AP_InertialSensor: always allow for AK8963 on MPU9250
10 years ago
Andrew Tridgell
60b8736cf1
AP_InertialSensor: use right AK8963 compass defines
10 years ago
Andrew Tridgell
808c33d0a7
AP_InertialSensor: support both MPU9250 and MPU9255
...
seems to be just different WHOAMI register
10 years ago
Andrew Tridgell
3d7d46b9b0
AP_InertialSensor: replaced INS_MPU6K_FILTER with INS_ACCEL_FILTER and INS_GYRO_FILTER
...
this allows filtering to be set separately on accels and gyros where possible
10 years ago
Jonathan Challinger
155c173ed1
AP_InertialSensor: rename _rotate_and_offset to _publish
10 years ago
Jonathan Challinger
502446d821
AP_InertialSensor: use LowPassFilter2pVector3f
10 years ago
mirkix
fa950a735e
AP_InertialSensor: add support for BBBMINI, simple ArduPilot DIY Cape for the BeagleBone Black
10 years ago
Andrew Tridgell
1b3c3c754d
AP_InertialSensor: use correct ifdef for AK8963
10 years ago
Staroselskii Georgii
f7f9cd2173
AP_InertialSensor: prevented MPU9250 from disabling I2C slaves
10 years ago
Andrew Tridgell
3518cf5480
AP_InertialSensor: fixed default MPU9250 orientation for NavIO
10 years ago
Andrew Tridgell
a047d1f569
AP_InertialSensor: moved default filter and sample_rate to frontend
...
this simplifies the backends and prevents code repitition
10 years ago
Andrew Tridgell
3a9a5a9c18
AP_InertialSensor: implement gyro and accel health monitoring
...
sensor is healthy if it gave a sample on the last update()
10 years ago
Andrew Tridgell
586fa9a816
AP_InertialSensor: added product_id support
...
fill in parameter from first backend
10 years ago
Andrew Tridgell
dcef9bb3b8
AP_InertialSensor: converted the MPU9250 driver to new API
10 years ago
Andrew Tridgell
dcdb53584b
AP_InertialSensor: use lockless structures in MPU9250 driver
...
this avoids suspending timers when transferring data between main
thread and SPI read thread
11 years ago
Andrew Tridgell
a14f8dbd0a
AP_InertialSensor_MPU9250: use micros64() and millis64()
11 years ago
Andrew Tridgell
3c2ab31415
AP_InertialSensor: get rid of data_ready for MPU9250
...
when running off a 1kHz timer and reading at 1kHz it is better to
double sample than it is to skip a sample, as skipping samples will
throw the filter off, whereas a double sample will have minimal effect
11 years ago
Andrew Tridgell
9e01c657e5
AP_InertialSensor: update MPU9250 driver for 1kHz operation
...
use a time base sample wait, with 1kHz sampling
11 years ago
Andrew Tridgell
50068a7c6a
AP_InertialSensor: fixed default orientation for PXF board MPU9250
11 years ago
Víctor Mayoral Vilches
5e5319e23b
AP_InertialSensor: MPU9250 cleaning
11 years ago
Mikhail Avkhimenia
34da221c3d
AP_InertialSensor: Use MPU9250 DRDY pin only on boards that support it
11 years ago
Andrew Tridgell
d1ba78002d
AP_InertialSensor: added paranoid check for DRDY pin
11 years ago
Andrew Tridgell
6f9965cc22
AP_InertialSensor: fixed setup of DRDY pin on MPU9250
11 years ago
Andrew Tridgell
6a6dbe5790
AP_InertialSensor: added check for WHOAMI on MPU9250
11 years ago
Andrew Tridgell
abb53eb9a2
AP_InertialSensor: simplify using HAL board subtypes
11 years ago
Andrew Tridgell
848b563fc3
AP_InertialSensor: rotate acccel/gyro for PXF
11 years ago
Víctor Mayoral Vilches
aa60a89cda
AP_InertialSensor_MPU9250: Fix SPI CS.
11 years ago
Víctor Mayoral Vilches
5e7e28a83e
AP_InertialSensor_MPU9250.cpp: Update the DRDY pin.
11 years ago
Víctor Mayoral Vilches
fac3d1c271
AP_InertialSensor_MPU9250: SPI userspace sensor driver.
...
InvenSense MPU9250 sensor driver and test code (available under
libraries/examples/).
11 years ago
Andrew Tridgell
ece01da10e
AP_InertialSensor: fixed _dump_registers() for MPU6000
...
need to take the semaphore to prevent bus errors
11 years ago
Andrew Tridgell
b1c5f23bbd
AP_InertialSensor: make get_delta_time() const
...
allows use from AP_NavEKF
11 years ago
Andrew Tridgell
a0688a69d4
AP_InertialSensor: generalise the accel/gyro calibration for N sensors
11 years ago
Andrew Tridgell
2753449e75
AP_InertialSensor: added support for multiple accel/gyro devices
...
this makes it possible to ask for the gyro and accel vectors from
secondary INS devices.
11 years ago
Andrew Tridgell
80def01fbe
AP_InertialSensor: fixed semaphore error on startup for MPU6000
11 years ago
Andrew Tridgell
f5299e2e11
AP_InertialSensor: added healthy check for PX4 and HIL
...
used to detect bad accels
11 years ago
Andrew Tridgell
9ecd889e9d
AP_InertialSensor: detect bad MPU6000 SPI transactions and lower bus speed
...
this uses bad data or bad INT_STATUS values from the MPU6000 to detect
the sensor running too fast and lower bus speed
11 years ago
Andrew Tridgell
b98bcbf715
AP_InertialSensor: automatically lower bus speed on mpu6k bad reads
11 years ago
Andrew Tridgell
bdc40cc7df
AP_InertialSensor: try to lower SPI bus speed on errors
11 years ago
Andrew Tridgell
9833900f91
AP_InertialSensor: run MPU6000 sensor register reads at 8MHz
...
run other register IO at 500kHz
12 years ago
Andrew Tridgell
e5e4cdee18
AP_InertialSensor: added wait_for_sample() API call
...
this waits for a new INS sample to arrive, using whatever method is
most efficient on each INS type
12 years ago
Andrew Tridgell
dda68bddcb
AP_InertialSensor: updates for AP_HAL::MemberProc
12 years ago
Andrew Tridgell
03036c632d
AP_InertialSensor: use new scheduler API
12 years ago
Randy Mackay
f7ba0438ef
InertialSensor: remove DMP
...
this saves 3K of flash
12 years ago