Skip to content

Commit 044029c

Browse files
committed
Update copyrights and fix CO2 to catch overflow not NAN
Closes SEN66 returns 65535 for first data read, better to skip first value than mess up all the graphs #678
1 parent 8086b44 commit 044029c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/components/i2c/drivers/WipperSnapper_I2C_Driver_SEN5X.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
/*!
22
* @file WipperSnapper_I2C_Driver_SEN5X.h
33
*
4-
* Device driver for the SEN5X CO2, Temperature, and Humidity sensor.
5-
* TEMPORARY HACK
4+
* Device driver for the SEN5X air quality sensors.
65
*
76
* Adafruit invests time and resources providing this open source code,
87
* please support Adafruit and open-source hardware by purchasing
98
* products from Adafruit!
109
*
11-
* Copyright (c) Marni Brewster 2022 for Adafruit Industries.
10+
* Copyright (c) Tyeth Gundry 2022 for Adafruit Industries.
1211
*
1312
* MIT license, all text here must be included in any redistribution.
1413
*

src/components/i2c/drivers/WipperSnapper_I2C_Driver_SEN6X.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
/*!
22
* @file WipperSnapper_I2C_Driver_SEN6X.h
33
*
4-
* Device driver for the SEN66 Particulate Matter, Temperature, Humidity, VOC, NOX, and CO2 sensor.
4+
* Device driver for the SEN66 Particulate Matter, Temperature, Humidity, VOC,
5+
* NOX, and CO2 sensor.
56
*
67
* Adafruit invests time and resources providing this open source code,
78
* please support Adafruit and open-source hardware by purchasing
89
* products from Adafruit!
910
*
10-
* Copyright (c) Marni Brewster 2022 for Adafruit Industries.
11+
* Copyright (c) Tyeth Gundry 2022 for Adafruit Industries.
1112
* Modified (c) by Martin Ebner 2024 https://github.com/MartinEbnerSensirion
1213
*
1314
* MIT license, all text here must be included in any redistribution.
@@ -325,7 +326,7 @@ class WipperSnapper_I2C_Driver_SEN6X : public WipperSnapper_I2C_Driver {
325326
massConcentrationPm10p0, ambientHumidity, ambientTemperature, vocIndex,
326327
noxIndex, co2);
327328

328-
if ((_CO2SensorPeriod != 0 && error != 0) || co2 == NAN) {
329+
if ((_CO2SensorPeriod != 0 && error != 0) || co2 == 0xFFFF) {
329330
return false;
330331
}
331332

0 commit comments

Comments
 (0)