File tree Expand file tree Collapse file tree
src/components/i2c/drivers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,12 +94,24 @@ class WipperSnapper_I2C_Driver_SGP30 : public WipperSnapper_I2C_Driver {
9494protected:
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 );
You can’t perform that action at this time.
0 commit comments