Commit Graph

94 Commits

Author SHA1 Message Date
Peter Barker
759c37271a AP_Baro: remove HIL support 2021-07-04 08:19:10 +10:00
Andrew Tridgell
0fd335af33 AP_Baro: changed health check for AP_Periph
avoid alt check and calibration check
2021-05-09 06:44:19 +10:00
Andrew Tridgell
474f22c3fe AP_Baro: allow for define of BARO_MAX_INSTANCES 2021-05-09 06:44:19 +10:00
Patrick José Pereira
6a824b1467 AP_Baro: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Josh Henderson
275c2849cf AP_Baro: Privatize Logging 2021-02-02 17:55:27 +11:00
Andrew Tridgell
75c789fc57 AP_Baro: added ExternalAHRS backend 2021-01-05 21:13:12 +11:00
Andrew Tridgell
1c1c067dee AP_Baro: rework to separate out wind coefficient params
- disable on low flash boards
 - add an enable parameter per baro for wind coeffients
2020-12-11 15:21:41 +11:00
Paul Riseborough
0be0498801 AP_Baro: Add static pressure positoin error correction 2020-12-11 15:21:41 +11:00
Peter Barker
6f7fbece49 AP_Baro: add accessor for external bus parameter 2020-12-04 16:37:10 +11:00
Andrew Tridgell
7daf8d3cd4 AP_Baro: fixed build warnings for MSP with AP_Periph 2020-09-15 09:40:03 +10:00
yaapu
ea53ce2a3f AP_Baro: support for MSP barometer 2020-09-09 06:35:50 +10:00
Andrew Tridgell
326ab0d7b8 AP_Baro: added get_primary() method 2020-08-27 20:20:51 +10:00
Andrew Tridgell
978a7d2859 AP_Baro: added device IDs for barometers
this allows us to tell what barometers were detected in logs
2020-07-21 08:20:01 +09:00
Andrew Tridgell
322bad3fd9 AP_Baro: make all semaphores recursive
the cost is very similar and this prevents an easy coding error which
can occur on less used code paths
2020-01-19 20:19:30 +11:00
Michel Pastor
0857cf49d5 AP_Baro: add driver for the SPL06-001 2019-11-24 16:47:31 -08:00
Andrew Tridgell
a19e55e83c AP_Baro: added BMP388 driver 2019-08-27 10:29:56 +10:00
Michael du Breuil
5645709e50 AP_Baro: Rearrange the sensor struct
Saves 12 bytes of RAM, 144 bytes of flash on CubeBlack
2019-07-31 14:30:25 +10:00
Andrew Tridgell
5023b51679 AP_Baro: added semaphore for safe multi-thread use of APIs 2019-05-30 08:33:12 +10:00
Tom Pittenger
b54da9aab8 AP_Baro: rename dataflash to logger 2019-03-28 16:40:57 +11:00
Tom Pittenger
52887e1c45 AP_Baro: unify singleton naming to _singleton and get_singleton() 2019-02-10 19:09:58 -07:00
Andrew Tridgell
1439b1a730 AP_Baro: added option to probe any i2c baro using GND_PROBE_EXT
This adds a hwdef.dat define HAL_PROBE_EXTERNAL_I2C_BAROS. When set,
we get a new parameter GND_PROBE_EXT that is a bitmask of i2c
barometers to look for.

This allows boards that have no builtin baro to work without
rebuilding
2018-08-23 13:29:59 +10:00
Patrick José Pereira
c7f832e81f AP_Baro: Add SimpleUnderWaterAtmosphere function
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-05-10 16:05:58 -04:00
Peter Barker
a5dc87e2af AP_Baro: do dataflash logging as part of update 2018-04-12 19:12:12 +01:00
night-ghost
cb8a34f784 AP_Baro: added range filter to backend, use it in most sensors (thanks khancyr for style correction) 2018-04-11 14:46:42 +10:00
Peter Barker
0675f41d1e AP_Baro: create AP::baro() function 2018-03-08 21:20:05 -08:00
Andrew Tridgell
472eed3847 AP_Baro: enable use of pressure correction
this allows for temperature correction of baro pressure
2018-02-08 17:36:33 +11:00
rde-mato
787420931e AP_Baro: make AP_Baro a singleton
for AP_Airspeed
2018-01-16 07:14:20 +11:00
Andrew Tridgell
68f8817e97 AP_Baro: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Lucas De Marchi
c5c1d5abfe AP_Baro: add static create method 2017-09-26 03:01:21 +01:00
Peter Barker
1748e7cb0c AP_Baro: make backends responsible for setting their health
This resolves a problem in SITL where the barometer would
not change value for prolonged period of time, making it
go unhealthy
2017-07-14 07:28:48 +09:00
Randy Mackay
6982e58cf2 Baro: health check that values are changing 2017-07-08 08:40:19 +09:00
Andrew Tridgell
9bdf971336 AP_Baro: added set_pressure_correction()
for use by AP_TempCalibration
2017-05-03 20:12:04 +10:00
Andrew Tridgell
ee4161fa62 AP_Baro: moved SITL baro to standard sensor backend model 2017-05-03 20:12:04 +10: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
Jacob Walser
613bc46592 AP_Baro: Add support for water pressure and Sub 2017-02-21 11:26:14 +11: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
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
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
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
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
37ee3b44d2 AP_Baro: add accessor for baro drift 2016-05-13 17:15:41 -07:00
Andrew Tridgell
8b7bf5cf7a AP_Baro: allow setHIL to set last update time 2016-05-07 18:27:21 +10:00
Andrew Tridgell
0b71652afc AP_Baro; allow for exact replay of baro data 2016-05-07 18:27:20 +10:00
Andrew Tridgell
8a987bf67d AP_Baro: removed filtering of baro data in HIL/SITL
this was just causing lag in replay and doesn't actually help in SITL
2016-05-07 18:27:18 +10:00
Tom Pittenger
f435c5ee50 AP_Baro: tolerate GND_ALT_OFFSET step inputs
large inputs make the EKF angry, this will allow the param update to slew over a few seconds
2016-02-08 21:13:58 -08:00
Lucas De Marchi
81a298c9c8 AP_Baro: reduce header scope
We don't need to expose to other libraries how each backend is
implemented. AP_Baro.h is the main header, included by other libraries.

Instead of including each backend in the main header, move them to where
they are needed. Additionally standardize the order and how we include
the headers.

The advantages are:
	- Internals of each backend is not exposed outside of the
	  library
	- Faster incremental builds since we don't need to recompile
	  whoever includes AP_Baro.h because a backend changed
2015-12-02 10:40:50 +11:00
Andrew Tridgell
840c9e65bb AP_Baro: don't notify the GCS of new pressure reference too often 2015-11-09 14:34:07 +11:00
wsilva32
da9118fbd0 AP_Baro: average SITL baro measurements using update() 2015-10-21 10:25:08 +11:00