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
|
// get humidity, then get temperature reading from humidity measurement
|
||||||
struct si7021_env SI7021::getHumidityAndTemperature() {
|
struct si7021_env SI7021::getHumidityAndTemperature() {
|
||||||
si7021_env ret = {0, 0, 0};
|
si7021_env ret = {0, 0, 0};
|
||||||
ret.humidityBasisPoints = getHumidityBasisPoints();
|
ret.humidityPercent = getHumidityPercent();
|
||||||
ret.celsiusHundredths = _getCelsiusPostHumidity();
|
ret.celsiusHundredths = _getCelsiusPostHumidity();
|
||||||
ret.fahrenheitHundredths = (1.8 * ret.celsiusHundredths) + 3200;
|
ret.fahrenheitHundredths = (1.8 * ret.celsiusHundredths) + 3200;
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ This program is licensed under the GNU GPL v2
|
|||||||
typedef struct si7021_env {
|
typedef struct si7021_env {
|
||||||
int celsiusHundredths;
|
int celsiusHundredths;
|
||||||
int fahrenheitHundredths;
|
int fahrenheitHundredths;
|
||||||
unsigned int humidityBasisPoints;
|
unsigned int humidityPercent;
|
||||||
} si7021_env;
|
} si7021_env;
|
||||||
|
|
||||||
class SI7021
|
class SI7021
|
||||||
|
|||||||
Reference in New Issue
Block a user