From 00ba1d629b8c7ec007bf3612ff12d5e2a18f038f Mon Sep 17 00:00:00 2001 From: px4dev Date: Sat, 1 Sep 2012 16:26:12 -0700 Subject: Redo the math in the ms5611 driver to a) avoid re-computing scaling factors for every pressure measurement, b) be perhaps more readable and follow the data sheet more closely, and c) support calibration of the MSL pressure. --- apps/drivers/drv_baro.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps/drivers/drv_baro.h') diff --git a/apps/drivers/drv_baro.h b/apps/drivers/drv_baro.h index b79d5b5b0..176f798c0 100644 --- a/apps/drivers/drv_baro.h +++ b/apps/drivers/drv_baro.h @@ -69,6 +69,10 @@ ORB_DECLARE(sensor_baro); #define _BAROIOCBASE (0x2200) #define _BAROIOC(_n) (_IOC(_BAROIOCBASE, _n)) -/* currently no baro-specific ioctls */ +/** set corrected MSL pressure in pascals */ +#define BAROIOCSMSLPRESSURE _BAROIOC(0) + +/** get current MSL pressure in pascals */ +#define BAROIOCGMSLPRESSURE _BAROIOC(1) #endif /* _DRV_BARO_H */ -- cgit v1.2.3