Commit Graph

343 Commits

Author SHA1 Message Date
Jacob Walser 96f503d9d1 AP_Baro: Fix GND_EXT_BUS @Values formatting 2017-04-21 21:11:40 +01:00
Eugene Shamaev fd866d3e20 AP_Baro: removal of legacy UAVCAN support 2017-04-17 17:27:18 +10:00
Eugene Shamaev 331419a51e AP_Baro: support for UAVCAN connected barometers 2017-04-10 22:38:12 +01:00
Michael du Breuil c37209a8d5 AP_Baro: Limit ground temperature used for the altitude
Fix an incorrect EAS2TAS that was double counting altitude
2017-03-28 11:25:46 +11:00
Tom Pittenger fb24a03faf AP_Baro: don't compile drivers for devices that don't use them 2017-03-24 12:06:19 +11:00
Lucas De Marchi 00c2949dfb Add support for baro on aerofc 2017-03-24 12:06:19 +11:00
Francisco Ferreira f6687a2d6c AP_Baro: fix example output
PX4 boards can only start console after USB is connected so we need to
check it is available
2017-03-07 09:37:14 +11:00
Andrew Tridgell d5cad2ae44 AP_Baro: support AUAV21 board 2017-03-01 17:24:10 +11:00
Tom Pittenger fb214ef95f AP_Baro: fixed spelling in comment 2017-02-21 02:23:23 -08:00
Jacob Walser 613bc46592 AP_Baro: Add support for water pressure and Sub 2017-02-21 11:26:14 +11:00
murata f5c3de2a61 AP_Baro: Change from magic number 0 to definition name. 2017-02-18 14:12:36 +00:00
Lucas De Marchi 9814dc81e2 AP_Baro: examples: better output formatting 2017-02-12 01:22:35 +00:00
Lucas De Marchi 402f0cce85 AP_Baro: examples: fix coding style 2017-02-12 01:22:35 +00:00
murata 32b60432b4 AP_Baro: Add format specification.
AP_Baro: Add format specification.
2017-01-27 18:20:22 +11:00
murata 78a4cab06b AP_Baro: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Andrew Tridgell 8aa100d164 AP_Baro: fix for change to timer API 2017-01-14 12:54:37 +11:00
mirkix 1ce5e5360a AP_Baro: Add Bosch BMP280 driver 2017-01-14 12:52:07 +11:00
Lucas De Marchi 5472bc4de1 Global: change Device::PeriodicCb signature
Remove bool return as it's never being used and not supported on PX4.
2017-01-14 10:03:54 +11:00
murata 87c2dfd921 AP_Baro: Change to secure code, from magic number to sizeof value. 2017-01-12 13:56:18 -08:00
Victor Lambret a4108251e3 AP_Baro: fix get_last_update(instance)
The method was not using the instance parameter. Instead it always use
primary barometer. Bug was not detected because method
get_last_update() is used where instance is _primary.

Detected with warnings, warnings are useful :-)
2017-01-04 17:32:24 +00:00
murata 753638851e AP_Baro: Changed if statements to switch statement. 2016-12-20 14:13:47 +00:00
Andrew Tridgell 8a1275356d AP_Baro: moved MS5611 reset before prom read
thanks to Jacob and Lucas for pointing this out
2016-12-13 11:10:35 +11:00
Andrew Tridgell eea7758a63 AP_Baro: added GND_EXT_BUS option
this is needed to enable probing for a MS5611 on external I2C bus. The
MS5611 looks the same as a MS5525 airspeed sensor, so we can't just
auto-probe. Users will need to enable external barometers
2016-12-05 16:51:49 -08:00
Andrew Tridgell cd57422eed AP_Baro: set retries high during init of MS5611 on I2C 2016-12-02 09:47:51 +11:00
Andrew Tridgell f2246326bb AP_Baro: added MS5611 probing, and support 3 baros on Pixhawk2
this adds sensor probing for barometers, simplifies the MS5611 driver,
and adds support for the I2C external barometers on Pixhawk2
2016-11-25 21:40:11 +11:00
Andrew Tridgell c2125a0078 AP_Baro: wait forever for semaphore on startup 2016-11-21 18:04:10 -02:00
Andrew Tridgell b16226dddf AP_Baro: fixed a bug with corrupted conversions in MS5611 driver
the datasheet says that if you get back zero in an ADC read that the
next value can be corrupt. I have seen this happen on the FMUv1,
leading to bad altitude readings
2016-11-13 17:08:06 +11:00
Andrew Tridgell 41b132e576 AP_Baro: setup for new board PX4 IDs 2016-11-11 08:08:55 +11:00
Andrew Tridgell d716bbedee AP_Baro: use in-tree drivers for PH2SLIM 2016-11-10 11:44:52 +11:00
Andrew Tridgell fea7040aff AP_Baro: don't panic when we can't find MS5611
this makes booting a PH2 without its sensor hat on much easier
2016-11-10 11:44:51 +11:00
Andrew Tridgell b8c789cf35 AP_Baro: switch pixracer to always use in-tree drivers 2016-11-09 17:08:14 +11:00
Andrew Tridgell 565f1986e0 AP_Baro: fixed FMUv1 baro and enable in-tree driver for PHMINI 2016-11-09 17:08:13 +11:00
Andrew Tridgell 66026100c3 AP_Baro: enable dual baro on PH2 2016-11-09 17:08:03 +11:00
Andrew Tridgell 4df9b093c3 AP_Baro: fixed missed samples in ms5611 driver 2016-11-09 17:08:03 +11:00
Andrew Tridgell bedee31f61 AP_Baro: fixed semaphore and thread usage in baro drivers 2016-11-09 17:08:02 +11:00
Andrew Tridgell 72c2e3a4d5 AP_Baro: select in-tree vs PX4 drivers at runtime 2016-11-09 17:07:58 +11:00
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Peter Barker dbecb1bc25 AP_Baro: add missing parameter metadata 2016-10-27 09:15:03 -07:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Lucas De Marchi ae53920e5b build: don't build examples with old build system
We currently check examples are buildable with waf which doesn't need
the libraries to be specified in a make.inc file.  Having the makefiles
there is misleading since people try to build and realize the build is
broken.
2016-10-11 13:03:08 +11:00
Andy Little 0d113b265c Examples: fix examples for px4
The change to use AP_BoardConfig messed up the examples. Here are some
updated but there are plenty more to do.
2016-10-04 12:50:47 -03:00
Lucas De Marchi e217faacab AP_Baro: MS56XX: cosmetic changes to members
- reorder and document members.
    - remove tentative of vertical alignement
    - like was done for accumulated values, move the calibration
      values to a struct
2016-07-30 00:55:28 -03:00
Lucas De Marchi f7b453359d AP_Baro: MS56XX: convert to threaded bus
This converts MS56XX to use the thread started by SPI/I2C instead of
using the timer thread. This also fixes a possible starvation of the
main thread:

    1) INS driver registers itself to be sampled on timer thread
    2) MS56XX registers itself to be sampled on timer thread
    3) Main thread waits for a sample from INS with
       ins.wait_for_sample()
    4) timer thread is waiting on update from MS56XX and consequently
       the main thread is waiting on an I2C/SPI transfer

Besides this starvation there's another one due to reuse of the timer
lock in order to pump values from the timer thread to the main thread. A
call to the update() method when we have a sample available would need
to wait on any other driver holding the timer lock.

Now there's a lock just to pass the new values from the bus thread to
the main thread with a very tiny critical region, not waiting on any
bus transfers and/or syscalls.
2016-07-30 00:55:28 -03:00
Lucas De Marchi 929348ff75 AP_Baro: MS5611: always use timer thread
Remove support to run MS5611 on main thread since we shouldn't be doing
I2C transactions there and we are moving to "thread per bus"
nonetheless.
2016-07-30 00:55:28 -03:00
Tom Pittenger 84ce499a0d AP_Baro: remove zero-init in constructor 2016-07-11 22:11:34 -07:00
Tom Pittenger 1d81df8144 Revert "AP_Baro: coverity scan - variables not initialized in constructor"
This reverts commit 8d2872d3ab.
2016-07-11 22:02:41 -07:00
Tom Pittenger 8d2872d3ab AP_Baro: coverity scan - variables not initialized in constructor 2016-07-05 13:32:06 -07:00
Tom Pittenger f1f58e2026 AP_Baro: created baro drift offset accessor 2016-05-13 17:22:11 -07:00
Tom Pittenger d55050e5e3 AP_Baro: slow down the LPF for slewing to a new GND_ALT_OFFSET
Instead of a couple seconds, make it about 15sec. This makes TECS happy by not glitching the height demand as much. When applied too fast the TECS height demand causes a large single oscillation as it chases the filter lag.
2016-05-13 17:15:53 -07:00
Tom Pittenger 37ee3b44d2 AP_Baro: add accessor for baro drift 2016-05-13 17:15:41 -07:00