Skip to content

Commit 5cbb3d5

Browse files
committed
sgp40 docs doxygen
1 parent b1154e2 commit 5cbb3d5

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/components/i2c/drivers/WipperSnapper_I2C_Driver_SGP40.h

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,25 @@ class WipperSnapper_I2C_Driver_SGP40 : public WipperSnapper_I2C_Driver {
147147

148148
protected:
149149
Adafruit_SGP40 *_sgp40; ///< SGP40
150-
// background accumulation state
150+
151+
/** Millis timestamp of last 1 Hz background read. */
151152
uint32_t _lastFastMs = 0;
153+
154+
/** Number of samples accumulated since last publish. */
152155
uint32_t _n = 0;
156+
157+
/** Running sum of VOC index samples for averaging. */
153158
float _vocSum = 0.0f;
159+
160+
/** Running sum of raw samples for averaging. */
154161
uint32_t _rawSum = 0;
155162

156-
// enable fast sampling if either output is requested
163+
/*******************************************************************************/
164+
/*!
165+
@brief Returns whether VOC background sampling should be active.
166+
@return True if either VOC Index or raw value is configured to publish.
167+
*/
168+
/*******************************************************************************/
157169
inline bool vocEnabled() {
158170
return (getSensorVOCIndexPeriod() > 0) || (getSensorRawPeriod() > 0);
159171
}

0 commit comments

Comments
 (0)