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
Lucas De Marchi
b292873304
AP_InertialSensor: fix starvation in L3G4200D
...
The main thread would always be blocked on the semaphore to read the
data from accelerometer and gyroscope. Especially if we have a slow
update of these values in _accumulate() due to the I2C transfer function
taking too much time: the timer thread would never give up the CPU,
causing starvation on the main thread.
This fixes the issue by reducing the critical region using a flip-buffer
so _accumulate() can work on its own copy of the data. Now that the
critical region is smaller, also avoid the semaphore and use a spinlock
instead.
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
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
2d47a07480
AP_InertialSensor: ported L3G4200D driver to new API
10 years ago
Andrew Tridgell
abb53eb9a2
AP_InertialSensor: simplify using HAL board subtypes
11 years ago
Víctor Mayoral Vilches
df14318bbd
AP_InertialSensor_L3G4200D: Clock-based wait_for_sample() impl.
11 years ago
Andrew Tridgell
ab7e96b9de
AP_InertialSensor: updates for ERLE board type
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
f5299e2e11
AP_InertialSensor: added healthy check for PX4 and HIL
...
used to detect bad accels
11 years ago
Andrew Tridgell
5d685385eb
AP_InertialSensor: use gyro sample count on L3G4200D
...
this gives more even timing in ArduCopter
12 years ago
Andrew Tridgell
6444b0bddd
AP_InertialSensor_L3G4200D: a sample is only available if gyro had a sample
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
1aabd7155e
AP_InertialSensor: added L3G4200D driver
...
this is for a cheap ebay 10DOF sensor
12 years ago