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.
2015-04-14 10:01:47 +10:00
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
2015-03-12 12:50:31 +11:00
Jonathan Challinger
502446d821
AP_InertialSensor: use LowPassFilter2pVector3f
2015-03-12 12:50:27 +11:00
Andrew Tridgell
a047d1f569
AP_InertialSensor: moved default filter and sample_rate to frontend
...
this simplifies the backends and prevents code repitition
2014-10-24 12:10:40 +11:00
Andrew Tridgell
586fa9a816
AP_InertialSensor: added product_id support
...
fill in parameter from first backend
2014-10-24 12:10:39 +11:00
Andrew Tridgell
2d47a07480
AP_InertialSensor: ported L3G4200D driver to new API
2014-10-24 12:10:37 +11:00
Andrew Tridgell
abb53eb9a2
AP_InertialSensor: simplify using HAL board subtypes
2014-07-14 09:44:35 +10:00
Víctor Mayoral Vilches
df14318bbd
AP_InertialSensor_L3G4200D: Clock-based wait_for_sample() impl.
2014-07-14 09:29:08 +10:00
Andrew Tridgell
ab7e96b9de
AP_InertialSensor: updates for ERLE board type
2014-07-14 08:51:44 +10:00
Andrew Tridgell
b1c5f23bbd
AP_InertialSensor: make get_delta_time() const
...
allows use from AP_NavEKF
2014-02-15 05:29:47 +11:00
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.
2013-12-09 17:34:05 +11:00
Andrew Tridgell
5d685385eb
AP_InertialSensor: use gyro sample count on L3G4200D
...
this gives more even timing in ArduCopter
2013-10-08 19:20:34 +11:00
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
2013-10-08 17:31:15 +11:00
Andrew Tridgell
1aabd7155e
AP_InertialSensor: added L3G4200D driver
...
this is for a cheap ebay 10DOF sensor
2013-10-08 11:50:53 +11:00