Check value sensor value

This commit is contained in:
Phat Nguyen
2024-07-24 09:05:57 +07:00
parent df6cca3714
commit 5fb27b6d1e
19 changed files with 525 additions and 285 deletions

View File

@ -104,7 +104,7 @@ void S8::getFirmwareVersion(char firmver[]) {
*/
int32_t S8::getSensorTypeId(void) {
if (this->isBegin() == false) {
return -1;
return utils::getInvalidCO2();
}
int32_t sensorType = 0;
@ -246,7 +246,7 @@ int16_t S8::getCo2(void) {
AgLog("Error getting CO2 value!");
}
return utils::correctCO2(co2);
return co2;
}
/**