Skip to content

Commit

Permalink
add precision on measure units in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lukh committed Feb 4, 2023
1 parent 559b1ca commit bbe18e9
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/modm/driver/pressure/ms5837_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Data : public DataBase
public:

/**
* @brief Get the calibrated pressure data with 0.25 mbar resolution (in mbar)
* @brief Get the calibrated pressure data with 0.25 mbar resolution (in tenth of mbar (10^-4 bar))
* @attention No I2C transaction
*
* @return int32_t
Expand All @@ -128,11 +128,16 @@ Data : public DataBase
void inline
getPressure(int32_t &pres) { pres = getPressure(); }

/**
* @brief Get the calibrated pressure data with 0.25 mbar resolution (in mbar)
* @attention No I2C transaction
* @return void
*/
void inline
getPressure(float &pres) { pres = float(getPressure()) / 10.0f; }

/**
* @brief Get the calibrated temperature data with 0.01 degrees Centigrade resolution
* @brief Get the calibrated temperature data with 0.01 degrees Centigrade resolution (2501 = 25.01°C)
* @attention No I2C transaction
*
* @return int32_t
Expand All @@ -143,6 +148,12 @@ Data : public DataBase
void inline
getTemperature(int32_t &temp) { temp = getTemperature(); }

/**
* @brief Get the calibrated temperature data with 0.01 degrees Centigrade resolution, in °C
* @attention No I2C transaction
*
* @return void
*/
void inline
getTemperature(float &temp) { temp = float(getTemperature()) / 100.0f; }

Expand Down

0 comments on commit bbe18e9

Please sign in to comment.