Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
alranel authored Nov 14, 2023
2 parents c6e414a + 202640d commit dfaacef
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Compile Examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Compile examples
uses: arduino/compile-sketches@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-arduino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Arduino Lint
uses: arduino/arduino-lint-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Spell check
uses: codespell-project/actions-codespell@master
4 changes: 2 additions & 2 deletions .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download JSON schema for labels configuration file
id: download-schema
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
echo "::set-output name=flag::--dry-run"
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download configuration files artifact
uses: actions/download-artifact@v3
Expand Down
30 changes: 18 additions & 12 deletions src/AirQualityClass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ void AirQualityClass::end()

float AirQualityClass::readVOC()
{
float reading = 0.0;
if (_revision == BOARD_REVISION_2) {
unsigned int time_Start = millis();
while(millis() - time_Start < BME68X_TIMEOUT) {
Expand All @@ -101,13 +102,14 @@ float AirQualityClass::readVOC()
checkIaqSensorStatus();
}
}
float reading = iaqSensor->breathVocEquivalent;
return reading;
reading = iaqSensor->breathVocEquivalent;
}
return reading;
}

float AirQualityClass::readGasResistor()
{
float reading = 0.0;
if (_revision == BOARD_REVISION_2) {
unsigned int time_Start = millis();
while(millis() - time_Start < BME68X_TIMEOUT) {
Expand All @@ -117,13 +119,14 @@ float AirQualityClass::readGasResistor()
checkIaqSensorStatus();
}
}
float reading = iaqSensor->gasResistance;
return reading;
reading = iaqSensor->gasResistance;
}
return reading;
}

float AirQualityClass::readIAQ()
{
float reading = 0.0;
if (_revision == BOARD_REVISION_2) {
unsigned int time_Start = millis();
while(millis() - time_Start < BME68X_TIMEOUT) {
Expand All @@ -133,13 +136,14 @@ float AirQualityClass::readIAQ()
checkIaqSensorStatus();
}
}
float reading = iaqSensor->iaq;
return reading;
reading = iaqSensor->iaq;
}
return reading;
}

float AirQualityClass::readIAQAccuracy()
{
float reading = 0.0;
if (_revision == BOARD_REVISION_2) {
unsigned int time_Start = millis();
while(millis() - time_Start < BME68X_TIMEOUT) {
Expand All @@ -149,13 +153,14 @@ float AirQualityClass::readIAQAccuracy()
checkIaqSensorStatus();
}
}
float reading = iaqSensor->iaqAccuracy;
return reading;
reading = iaqSensor->iaqAccuracy;
}
return reading;
}

float AirQualityClass::readStaticIAQ()
{
float reading = 0.0;
if (_revision == BOARD_REVISION_2) {
unsigned int time_Start = millis();
while(millis() - time_Start < BME68X_TIMEOUT) {
Expand All @@ -165,14 +170,15 @@ float AirQualityClass::readStaticIAQ()
checkIaqSensorStatus();
}
}
float reading = iaqSensor->staticIaq;
return reading;
reading = iaqSensor->staticIaq;
}
return reading;
}


float AirQualityClass::readCO2()
{
float reading = 0.0;
if (_revision == BOARD_REVISION_2) {
unsigned int time_Start = millis();
while(millis() - time_Start < BME68X_TIMEOUT) {
Expand All @@ -182,8 +188,8 @@ float AirQualityClass::readCO2()
checkIaqSensorStatus();
}
}
float reading = iaqSensor->co2Equivalent;
return reading;
reading = iaqSensor->co2Equivalent;
}
return reading;
}

0 comments on commit dfaacef

Please sign in to comment.