@@ -16,9 +16,8 @@ class SDPSensor {
1616 uint8_t i2c_addr; /* I2C address */
1717 i2c_port_t i2c_port; /* I2C master port */
1818 uint16_t pressureScale; /* Diff pressure scale */
19- uint32_t failsCount; /* SDP successive failed reads count */
20- uint32_t maxSuccessiveFailsCount; /* SDP max successive failed reads before SW reset */
21- uint8_t computeCRC (uint8_t *data); /* Compute CRC from data */
19+ uint32_t failsCount; /* [watchdog] SDP successive failed reads count */
20+ uint32_t maxSuccessiveFailsCount; /* [watchdog] SDP max successive failed reads before SW reset */
2221 public:
2322
2423 /* *
@@ -76,6 +75,8 @@ class SDPSensor {
7675
7776 /* *
7877 * Reset the SDP sensor.
78+ * All other sensors connected to the same I2C line
79+ * (same port) will also receive the reset command.
7980 *
8081 * @returns the error code (defined in esp_err.h)
8182 */
@@ -106,10 +107,10 @@ class SDPSensor {
106107
107108
108109 /* *
109- * Read the raw differential pressure value and save the result
110- * in `diffPressureRaw`. To convert it to the real value in Pa,
111- * one should divide it by the pressure scale (see
112- * `getPressureScale()` function).
110+ * Read the raw (unnormalized) differential pressure value and
111+ * save the result in `diffPressureRaw`. To convert it to a
112+ * physical value in Pa, one should divide it by the pressure
113+ * scale (see the `getPressureScale()` function).
113114 *
114115 * This call is non-blocking (zero I2C timeout).
115116 *
@@ -120,17 +121,19 @@ class SDPSensor {
120121 * ESP_ERR_TIMEOUT - timed out
121122 * ESP_ERR_INVALID_CRC - CRC mismatch
122123 */
123- esp_err_t readContinuousRaw (int16_t *diffPressureRaw);
124+ esp_err_t readDiffPressure (int16_t *diffPressureRaw);
124125
125126
126127 /* *
127128 * Read the raw differential pressure value AND the temperature.
128129 *
130+ * This call is non-blocking (zero I2C timeout).
131+ *
129132 * @param diffPressureRaw - a pointer to save the diff pressure
130133 * @param temperature - a pointer to save the temperature in Celsius
131134 * @returns the error code (defined in esp_err.h)
132135 */
133- esp_err_t readContinuousRawTemperature (int16_t *diffPressureRaw, float *temperature);
136+ esp_err_t readDiffPressureTemperature (int16_t *diffPressureRaw, float *temperature);
134137};
135138
136139#endif /* SDPSENSOR_H_ */
0 commit comments