Commit Graph

12890 Commits

Author SHA1 Message Date
Andrew Tridgell
62805f59fa AP_Compass: added AK09916 driver
yet another magnetometer!
2016-11-25 17:50:24 +11:00
Andrew Tridgell
17a117b324 AP_Compass: be a bit less verbose in startup 2016-11-25 17:50:23 +11:00
Andrew Tridgell
0e4b8781b2 AP_Compass: auto-detect LIS3MDL compass 2016-11-25 17:50:23 +11:00
Andrew Tridgell
b6b2919126 AP_Compass: don't panic on too many compasses
just use the first ones found. Panicing because you have too many
isn't useful
2016-11-25 17:50:23 +11:00
Andrew Tridgell
40ef68f104 AP_Compass: added a LIS3MDL compass driver 2016-11-25 17:50:23 +11:00
Andrew Tridgell
f3a778f980 AP_InertialSensor: fixed freeing of fifo buffer 2016-11-25 17:50:19 +11:00
Andrew Tridgell
6f28c61c8d AP_InertialSensor: changed SIZE to LEN
thanks to Lucas for suggestion
2016-11-25 17:50:19 +11:00
hiro2233
cb7f46d653 AP_InertialSensor: fixed handling of user_ctrl register
with aux bus implementations
2016-11-25 17:50:18 +11:00
Andrew Tridgell
29bbee421e HAL_PX4: enable sharing of SPI bus with PX4 with DMA 2016-11-25 17:50:18 +11:00
Andrew Tridgell
9b4c588c09 AP_InertialSensor: adapt drivers for SPI-DMA capable systems
no longer need accumulate() transfers with SPI enabled DMA on stm32
2016-11-25 17:49:58 +11:00
Andrew Tridgell
3fad5ca065 HAL_PX4: implement DMA allocation routines 2016-11-25 17:49:58 +11:00
Andrew Tridgell
e42bb20052 AP_HAL: added dma allocation routines to hal.util 2016-11-25 17:49:58 +11:00
Andrew Tridgell
28daddaaf2 AP_InertialSensor: don't use accumulate approach on Linux or I2C 2016-11-25 17:49:57 +11:00
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!
2016-11-25 17:49:57 +11:00
Andrew Tridgell
b165e025d9 Filter: added new constructor for 1p filter
allow both sample rate and cutoff to be specified in constructor
2016-11-25 17:49:57 +11:00
Andrew Tridgell
7220dc15f9 HAL_PX4: adjusted bus speeds on invensense sensors 2016-11-25 17:49:57 +11:00
Andrew Tridgell
5934a099a4 AP_HAL: added support for more SRXL varients
based on work by Roman Seb <roman-29188@gmx.de>
2016-11-24 22:54:23 +11:00
priseborough
0a177d04fd AP_NavEKF2: Simply core switch implementation
Functionally equivalent
2016-11-24 19:58:10 +09:00
priseborough
7d48054e6f AP_NavEKF2: Group GPS innovation tests when compiling error score 2016-11-24 19:58:07 +09:00
Randy Mackay
e9ea06bd10 AP_NavEKF2: minor comment fix 2016-11-24 19:58:03 +09:00
Randy Mackay
a32068a973 AC_WPNav: remove ekf position reset handler
This has been migrated to the position control library
2016-11-24 19:58:00 +09:00
Randy Mackay
1012333eef AC_PosControl: add ekf position reset handling
Previously this was in AC_WPNav and used only for loiter but it should work for any flight modes that use horizontal or vertical position control
2016-11-24 19:57:56 +09:00
Randy Mackay
c615bac1cd AP_AHRS: add getLastPosDownReset accessor 2016-11-24 19:57:53 +09:00
Randy Mackay
6406e34016 AC_WPNav: remove unused _loiter_step member 2016-11-24 19:57:50 +09:00
priseborough
0df45703f1 AP_NavEKF2: Fix errors in position reset delta publishing 2016-11-24 19:57:47 +09:00
priseborough
f6021c959d AP_NavEKF2: capture and publish vertical position reset deltas
Calculate the change in vertical position due to a internal EKF state reset or a EKF core switch
2016-11-24 19:57:45 +09:00
priseborough
e62863f9a1 AP_NavEKF2: Reduce unnecessary EKF core switching
1) Do not switch to a core until its states have been updated.
2) Distinguish between mandated switches required for health failure and optional switches required due to innovation checks failing.
3) Apply hyseresis to innovation check levels
2016-11-24 19:57:41 +09:00
murata
de153ce1d7 AP_NavEKF: Correct the setting process of variable dAngBiasSigma. 2016-11-24 03:24:18 +00:00
murata
ec42ddfb4e AP_NavEKF: style changes (tab to spaces, etc.)
AP_NavEKF: style changes (tab to spaces, etc.)

AP_NavEKF: style changes (tab to spaces, etc.)
2016-11-24 03:24:18 +00:00
ShingoMatsuura
e9feb7bdda AP_RangeFilnder: moved the const buffer definition to the header and changed from '8' to 'sizeof(send_request_buffer)' 2016-11-23 10:28:38 -08:00
ShingoMatsuura
f97ede9865 AP_RangeFilnder: change send_request_buffer member variable to const and other fixes 2016-11-23 10:28:38 -08:00
ShingoMatsuura
e8ff156fa6 AP_RangeFilnder: add clear buffer at INIT state and change send_buffer to member variable to reduce CRC computation for sending request 2016-11-23 10:28:38 -08:00
ShingoMatsuura
c1c643e56e AP_RangeFinder: remove clear buffer in send_request 2016-11-23 10:28:38 -08:00
Leonard Hall
ea0e413b04 AC_AttControl: do not limit rate if ATC_ACCEL_MAX param is zero 2016-11-23 14:43:29 +09:00
murata
ae927e1775 DataFlash: Adjust the return value to the type of the method.
DataFlash: Adjust the return value to the type of the method.
2016-11-22 10:07:16 -08:00
Lucas De Marchi
f9b0f9164a AP_HAL_Linux: add TODO to AnalogIn_Raspilot
This is especially bad for raspilot since it has a spi bus shared for
all the peripherals.
2016-11-21 18:11:31 -02:00
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.
2016-11-21 18:04:10 -02:00
Andrew Tridgell
c2125a0078 AP_Baro: wait forever for semaphore on startup 2016-11-21 18:04:10 -02:00
Andrew Tridgell
6f82ec0642 HAL_Linux: convert RASPilot drivers to thread per bus 2016-11-21 18:04:10 -02:00
Andrew Tridgell
6129b1abb6 AP_InertialSensor: wait forever for semaphore on startup
some boards take a silly amount of time to get semaphore on startup
2016-11-21 17:57:21 -02:00
Julien Beraud
d50fd3a6cd AP_OpticalFlow: fix onboard init
mistake in patch to avoid segfault which enabled
AP_OpticalFlow_Linux instead of AP_OpticalFlow_Onboard.
Store a reference to ahrs in order to execute init later, when
ahrs is initialized.
2016-11-21 16:38:59 -02:00
Michael du Breuil
d97861d685 AP_GPS: Ublox: Skip SBAS request if we don't want to alter it 2016-11-21 14:15:19 +09:00
Randy Mackay
b7f95d9c25 AP_RangeFinder: remove serial.end and begin
Also some formatting changes
2016-11-21 14:07:01 +09:00
Randy Mackay
99fafcb495 RangeFinder: add uLanding to TYPE parameter description 2016-11-21 13:52:15 +09:00
Ricardo de Almeida Gonzaga
148fa03d6b AP_RangeFinder: support MaxBotix Serial rangefinders
This has been tested with LV-MaxSonar®-EZ1 MB1010
2016-11-21 11:21:56 +09:00
Randy Mackay
44c5fee90d AP_RangeFinder: formatting fixes for uLanding 2016-11-21 11:07:41 +09:00
davidaroyer
69bc4c42c9 AP_RangeFinder: Add support for Aerotenna uLanding radar altimeter 2016-11-21 11:07:41 +09:00
davidaroyer
faa534cf64 AP_SerialManager: Add support for Aerotenna uLanding radar altimeter 2016-11-21 11:07:41 +09:00
Jonathan Challinger
22517422f9 AP_Motors: add option to disable motor PWM output while disarmed 2016-11-21 10:49:21 +09:00
Andrew Tridgell
6c09758447 AP_RangeFinder: removed momentary spikes in PulsedLight I2C Lidar 2016-11-21 10:30:04 +11:00