Changes to make use of previous temperature measurements

This commit is contained in:
dario
2024-04-28 10:56:42 +02:00
parent e96fae6f97
commit 7505f04558
2 changed files with 25 additions and 38 deletions

View File

@@ -119,9 +119,10 @@ namespace sta
* @brief Reads the current pressure value from the sensor. Obtains the temperature value from the interal sensor.
*
* @param unit Specifies the unit for the pressure measurement. Default is hPa.
* @param cachedTemp Specifies if a cached temperature value should be used.
* @return int32_t The measured value in the specified unit.
*/
float getPressure(Unit unit = Unit::hPa);
float getPressure(Unit unit = Unit::hPa, bool cachedTemp = false);
/**
* @brief Reads the current temperature value from the sensor.
@@ -129,7 +130,7 @@ namespace sta
* @return int32_t The measured temperature.
* @note There are better sensors for temperature measurements than the MS56xx.
*/
int32_t getTemperature();
float getTemperature();
/**
* @brief Provide a reference pressure value at a reference altitude in order to estimate the sealevel pressure.
@@ -216,6 +217,8 @@ namespace sta
OsrLevel osr_;
Intf intf_;
float dT_;
// Pressure at sealevel. Use the standard atmosphere per default.
float sealevel_ = 1013.25;
@@ -227,4 +230,4 @@ namespace sta
};
}
#endif // ifndef STA_SENSORS_MS5607_HPP
#endif // ifndef STA_SENSORS_MS5607_HPP