Updated library to use getHumidityPercentage, instead of getHumidityBasisPoints() in combined humidity/temperature reader
This commit is contained in:
@@ -128,7 +128,7 @@ void SI7021::setHeater(bool on) {
|
||||
// get humidity, then get temperature reading from humidity measurement
|
||||
struct si7021_env SI7021::getHumidityAndTemperature() {
|
||||
si7021_env ret = {0, 0, 0};
|
||||
ret.humidityBasisPoints = getHumidityBasisPoints();
|
||||
ret.humidityPercent = getHumidityPercent();
|
||||
ret.celsiusHundredths = _getCelsiusPostHumidity();
|
||||
ret.fahrenheitHundredths = (1.8 * ret.celsiusHundredths) + 3200;
|
||||
return ret;
|
||||
|
||||
@@ -23,7 +23,7 @@ This program is licensed under the GNU GPL v2
|
||||
typedef struct si7021_env {
|
||||
int celsiusHundredths;
|
||||
int fahrenheitHundredths;
|
||||
unsigned int humidityBasisPoints;
|
||||
unsigned int humidityPercent;
|
||||
} si7021_env;
|
||||
|
||||
class SI7021
|
||||
|
||||
Reference in New Issue
Block a user