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.
Fork of MPL3115A2 by
Revision 4:1a1817c65ca5, committed 2017-09-11
- Comitter:
- pyonta2017
- Date:
- Mon Sep 11 10:03:19 2017 +0000
- Parent:
- 3:7c7c1ea6fc33
- Commit message:
- a;
Changed in this revision
Altitude.h | Show annotated file Show diff for this revision Revisions of this file |
Temperature.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 7c7c1ea6fc33 -r 1a1817c65ca5 Altitude.h --- a/Altitude.h Wed Apr 02 12:59:44 2014 +0000 +++ b/Altitude.h Mon Sep 11 10:03:19 2017 +0000 @@ -32,7 +32,7 @@ enum unitsType { METERS, FEET }; Altitude(); - Altitude(float a, unitsType units = FEET); + Altitude(float a, unitsType units = METERS); Altitude(const char* compressed); Altitude(const char msb, const char csb, const char lsb); @@ -42,15 +42,15 @@ operator float(void) { return _altitude; } //! Returns the altitude in the units you specifiy, defaulting to FEET if none specified. - float altitude(unitsType units = FEET); + float altitude(unitsType units = METERS); //! Call to decompress the sensor data after an I2C read. void setAltitude(); void setAltitude(const char* compressed); void setAltitude(const char msb, const char csb, const char lsb); - void setAltitude(float a, unitsType units = FEET); + void setAltitude(float a, unitsType units = METERS); //! Returns the altitude as a string in the units specified, defaulting to FEET if none specified. - const char* print(unitsType units = FEET); + const char* print(unitsType units = METERS); //! Converts meters to feet. static float MetersToFeet(float meters) { return meters * 3.28084; }
diff -r 7c7c1ea6fc33 -r 1a1817c65ca5 Temperature.h --- a/Temperature.h Wed Apr 02 12:59:44 2014 +0000 +++ b/Temperature.h Mon Sep 11 10:03:19 2017 +0000 @@ -28,7 +28,7 @@ enum unitsType { CELSIUS, FAHRENHEIT, KELVIN }; Temperature(); - Temperature(float a, unitsType units = FAHRENHEIT); + Temperature(float a, unitsType units = CELSIUS); Temperature(const char* compressed); Temperature(const char msb, const char lsb); @@ -37,15 +37,15 @@ //! Same as calling temperature with FAHRENHEIT as the parameter. operator float(void) { return _temperature; } - float temperature(unitsType units = FAHRENHEIT); + float temperature(unitsType units = CELSIUS); //! Call to decompress the sensor data after an I2C read. void setTemperature(); void setTemperature(const char* compressed); void setTemperature(const char msb, const char lsb); - void setTemperature(float a, unitsType units = FAHRENHEIT); + void setTemperature(float a, unitsType units = CELSIUS); //! Returns the temperature as a string in the units specified, defaulting to FAHRENHEIT if none specified. - const char* print(unitsType units = FAHRENHEIT); + const char* print(unitsType units = CELSIUS); private: float _temperature;