Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: LinkNode_TemperatureAdvertising
Fork of BMP180 by
Diff: BMP180.cpp
- Revision:
- 1:072073c79cfd
- Parent:
- 0:9a0671b6009f
- Child:
- 2:5b3e84563dcb
--- a/BMP180.cpp Sat Mar 08 21:42:40 2014 +0000
+++ b/BMP180.cpp Mon Mar 17 20:42:23 2014 +0000
@@ -11,7 +11,7 @@
Released under the MIT License (see http://mbed.org/license/mit)
Documentation regarding the BMP180 can be found here:
- ...............
+ http://mbed.org/media/uploads/spiridion/bst-bmp180-ds000-09.pdf
*/
#include "BMP180.h"
@@ -24,13 +24,19 @@
BMP180::BMP180(PinName sda, PinName scl, int address)
: m_i2c(sda,scl), m_addr(address)
{
- Initialize();
+ m_altitude = 0;
+ m_oss = BMP180_OSS_NORMAL;
+ m_temperature = UNSET_BMP180_TEMPERATURE_VALUE;
+ m_pressure = UNSET_BMP180_PRESSURE_VALUE;
}
BMP180::BMP180(I2C& i2c, int address)
: m_i2c(i2c), m_addr(address)
{
- Initialize();
+ m_altitude = 0;
+ m_oss = BMP180_OSS_NORMAL;
+ m_temperature = UNSET_BMP180_TEMPERATURE_VALUE;
+ m_pressure = UNSET_BMP180_PRESSURE_VALUE;
}
int BMP180::Initialize(float altitude, int overSamplingSetting)
@@ -40,7 +46,6 @@
m_altitude = altitude;
m_oss = overSamplingSetting;
-
m_temperature = UNSET_BMP180_TEMPERATURE_VALUE;
m_pressure = UNSET_BMP180_PRESSURE_VALUE;
