diff options
author | px4dev <px4@purgatory.org> | 2012-09-01 16:26:12 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-09-01 16:26:12 -0700 |
commit | 00ba1d629b8c7ec007bf3612ff12d5e2a18f038f (patch) | |
tree | c552eac7f569077ee5c5abc3c9a5dfe01277474f /apps/drivers/drv_baro.h | |
parent | cf62c892f9a8016ee238be269ee6c4b674928e7f (diff) | |
download | px4-firmware-00ba1d629b8c7ec007bf3612ff12d5e2a18f038f.tar.gz px4-firmware-00ba1d629b8c7ec007bf3612ff12d5e2a18f038f.tar.bz2 px4-firmware-00ba1d629b8c7ec007bf3612ff12d5e2a18f038f.zip |
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.
Diffstat (limited to 'apps/drivers/drv_baro.h')
-rw-r--r-- | apps/drivers/drv_baro.h | 6 |
1 files changed, 5 insertions, 1 deletions
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 */ |