|
23 | 23 | #include <Wire.h> |
24 | 24 |
|
25 | 25 | #define SGP41_FASTTICK_INTERVAL_MS 1000 ///< Enforce ~1 Hz cadence |
26 | | -#define SGP41_CONDITIONING_TICKS 10 ///< Recommended warmup cycles |
27 | | -#define SGP41_VOC_LEARNING_MS 60000UL ///< VOC index meaningful after ~60s |
28 | | -#define SGP41_NOX_LEARNING_MS 300000UL ///< NOx index meaningful after ~300s |
| 26 | +#define SGP41_CONDITIONING_TICKS 10 ///< Recommended warmup cycles |
| 27 | +#define SGP41_VOC_LEARNING_MS 60000UL ///< VOC index meaningful after ~60s |
| 28 | +#define SGP41_NOX_LEARNING_MS 300000UL ///< NOx index meaningful after ~300s |
29 | 29 |
|
30 | 30 | /**************************************************************************/ |
31 | 31 | /*! |
@@ -231,21 +231,21 @@ class WipperSnapper_I2C_Driver_SGP41 : public WipperSnapper_I2C_Driver { |
231 | 231 | * Cached latest measurements from the sensor. |
232 | 232 | * - _rawValue: raw VOC sensor output (ticks) |
233 | 233 | * - _rawNOxValue: raw NOx sensor output (ticks) |
234 | | - * - _vocIdx: calculated VOC Gas Index |
235 | | - * - _noxIdx: calculated NOx Gas Index |
| 234 | + * - _vocIdx: calculated VOC Gas Index |
| 235 | + * - _noxIdx: calculated NOx Gas Index |
236 | 236 | */ |
237 | | - uint16_t _rawValue = 0; ///< Raw VOC sensor output (ticks) |
238 | | - uint16_t _rawNOxValue = 0; ///< Raw NOx sensor output (ticks) |
239 | | - float _vocIdx = 0; ///< Calculated VOC Gas Index |
240 | | - float _noxIdx = 0; ///< Calculated NOx Gas Index |
241 | | - VOCGasIndexAlgorithm _vocAlgorithm; ///< VOC gas index state machine |
242 | | - NOxGasIndexAlgorithm _noxAlgorithm; ///< NOx gas index state machine |
243 | | - uint8_t _conditioningTicks = 0; ///< Completed initial conditioning cycles |
244 | | - uint32_t _algoStartMs = 0; ///< Timestamp when gas index learning began |
| 237 | + uint16_t _rawValue = 0; ///< Raw VOC sensor output (ticks) |
| 238 | + uint16_t _rawNOxValue = 0; ///< Raw NOx sensor output (ticks) |
| 239 | + float _vocIdx = 0; ///< Calculated VOC Gas Index |
| 240 | + float _noxIdx = 0; ///< Calculated NOx Gas Index |
| 241 | + VOCGasIndexAlgorithm _vocAlgorithm; ///< VOC gas index state machine |
| 242 | + NOxGasIndexAlgorithm _noxAlgorithm; ///< NOx gas index state machine |
| 243 | + uint8_t _conditioningTicks = 0; ///< Completed initial conditioning cycles |
| 244 | + uint32_t _algoStartMs = 0; ///< Timestamp when gas index learning began |
245 | 245 | uint16_t _serialNumber[3] = {0, 0, 0}; ///< Optional serial number cache |
246 | 246 | uint16_t _selfTestResult = 0; ///< Optional self-test cache |
247 | | - bool _hasSerial = false; ///< True if serial number read succeeded |
248 | | - uint32_t _lastFastMs = 0; ///< Last poll timestamp to enforce cadence |
| 247 | + bool _hasSerial = false; ///< True if serial number read succeeded |
| 248 | + uint32_t _lastFastMs = 0; ///< Last poll timestamp to enforce cadence |
249 | 249 |
|
250 | 250 | /*******************************************************************************/ |
251 | 251 | /*! |
|
0 commit comments