Skip to content

Commit b1154e2

Browse files
committed
sgp30 doxygen
1 parent 662f61c commit b1154e2

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/components/i2c/drivers/WipperSnapper_I2C_Driver_SGP30.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,24 @@ class WipperSnapper_I2C_Driver_SGP30 : public WipperSnapper_I2C_Driver {
9494
protected:
9595
Adafruit_SGP30 *_sgp30; ///< Pointer to SGP30 sensor object
9696

97-
// Fast sampling state
97+
/** Millis timestamp of last 1 Hz background read. */
9898
uint32_t _lastFastMs = 0;
99+
100+
/** Number of samples accumulated since last publish. */
99101
uint32_t _n = 0;
102+
103+
/** Running sum of eCO2 samples for averaging. */
100104
uint32_t _eco2Sum = 0;
105+
106+
/** Running sum of TVOC samples for averaging. */
101107
uint32_t _tvocSum = 0;
102108

109+
/*******************************************************************************/
110+
/*!
111+
@brief Returns whether IAQ background sampling should be active.
112+
@return True if either eCO2 or TVOC metrics are configured to publish.
113+
*/
114+
/*******************************************************************************/
103115
inline bool iaqEnabled() {
104116
// Enable IAQ background reads if either metric is requested
105117
return (getSensorECO2Period() > 0) || (getSensorTVOCPeriod() > 0);

0 commit comments

Comments
 (0)