@@ -68,7 +68,6 @@ typedef struct
6868 struct bme68x_heatr_conf heatr_conf ;
6969
7070 /** Structure to store sensor measurement data. */
71- /** @todo: May modify this to be an array in order to support parallel mode */
7271 /** @note: Since we're not using floating point, the data will be as follows:
7372 * - Temperature in degrees celsius x100
7473 * - Pressure in Pascal
@@ -77,16 +76,6 @@ typedef struct
7776 */
7877 struct bme68x_data sensor_data ;
7978
80- // /** Array to store multiple sensor data values (for parallel mode). */
81- // struct bme68x_data sensor_data[3];
82-
83- /** @todo: Similar to a sensor_data array, n_fields and i_fields are for parallel mode support */
84- // /** Number of data fields in parallel mode. */
85- // uint8_t n_fields;
86-
87- // /** Index for tracking sensor data fields. */
88- // uint8_t i_fields;
89-
9079 /** Last operation mode used by the sensor. */
9180 uint8_t last_opmode ;
9281} bme68x_sensor_t ;
@@ -146,22 +135,18 @@ void bme_set_TPH(bme68x_sensor_t *bme, uint8_t os_temp, uint8_t os_pres, uint8_t
146135 * @param[in] bme Pointer to bme68x sensor interface
147136 * @param[in] temp Heater temperature in degree Celsius
148137 * @param[in] dur Heating duration in milliseconds
149- * @todo: Implement similar functions for sequential and parallel modes, as needed.
150138 */
151139void bme_set_heaterprof (bme68x_sensor_t * bme , uint16_t temp , uint16_t dur );
152140
153141/**
154142 * @brief Set the operation mode
155143 *
156- * Set the desired operation mode.
157- * @todo: Initially, we will only support forced mode, which performs a single measurement
158- * and allows for automatically returning to sleep mode. The gas sensor heater only operates
159- * during measurement in this mode.
160- * In parallel mode, multiple TPHG cycles are performed, the sensor does not return to sleep
161- * mode automatically, and the gas sensor heater operates in parallel to TPH measurement.
144+ * Set the desired operation mode. Currently supports sleep mode and forced mode for
145+ * a single, low-power measurment which may automatically return to sleep mode.
146+ * The gas sensor heater only operates during measurement in this mode.
162147 *
163148 * @param[in] bme Pointer to bme68x sensor interface
164- * @param[in] opmode BME68X_SLEEP_MODE, BME68X_FORCED_MODE, BME68X_PARALLEL_MODE, BME68X_SEQUENTIAL_MODE
149+ * @param[in] opmode BME68X_SLEEP_MODE, BME68X_FORCED_MODE
165150 */
166151void bme_set_opmode (bme68x_sensor_t * bme , uint8_t opmode );
167152
@@ -177,33 +162,12 @@ void bme_set_opmode(bme68x_sensor_t *bme, uint8_t opmode);
177162 */
178163uint8_t bme_fetch_data (bme68x_sensor_t * bme );
179164
180- /**
181- * @brief Get a single data field
182- *
183- * @todo: Implement as needed
184- *
185- * @param[in] bme Pointer to bme68x sensor interface
186- * @param[out] data Structure where the data is to be stored
187- * @return Number of new fields remaining
188- */
189- // uint8_t bme_get_data(bme68x_sensor_t *bme, bme68x_data &data);
190-
191- /**
192- * @brief Function to get whole sensor data
193- *
194- * @todo: Implement as needed
195- *
196- * @param[in] bme Pointer to bme68x sensor interface
197- * @return Sensor data
198- */
199- // bme68x_data *bme_get_alldata(bme68x_sensor_t *bme);
200-
201165/**
202166 * @brief Get the measurement duration in microseconds
203167 *
204168 * Calls bme68x_get_meas_dur, which calculates the total measurement duration
205169 * based on the total number of samples to be taken, as determined by the oversampling
206- * for each value; if not operating in parallel mode, a wake-up duration of 1ms is added.
170+ * for each value; a wake-up duration of 1ms is added.
207171 *
208172 * @param[in] bme Pointer to bme68x sensor interface
209173 * @param[in] opmode Operation mode of the sensor. Attempts to use the last one if nothing is set
@@ -269,14 +233,16 @@ int8_t bme_read(uint8_t reg_addr, uint8_t *reg_data, uint32_t length, void *intf
269233 * while (1)
270234 * {
271235 * bme_set_opmode(&bme, BME68X_FORCED_MODE);
236+ * // @todo: May adjust the specific timing function called here, but it should be based on bme_get_meas_dur
237+ * bme_delay_us(bme_get_meas_dur(&bme, BME68X_SLEEP_MODE), &hi2c1);
272238 * int fetch_success = bme_fetch_data(&bme);
273239 * if (fetch_success) {
274- debug_print("%d, ", bme.sensor_data.temperature);
275- debug_print("%d, ", bme.sensor_data.pressure);
276- debug_print("%d, ", bme.sensor_data.humidity);
277- debug_print("%d, ", bme.sensor_data.gas_resistance);
278- debug_print("%X, \r\n", bme.sensor_data.status);
279- }
240+ * debug_print("%d, ", bme.sensor_data.temperature);
241+ * debug_print("%d, ", bme.sensor_data.pressure);
242+ * debug_print("%d, ", bme.sensor_data.humidity);
243+ * debug_print("%d, ", bme.sensor_data.gas_resistance);
244+ * debug_print("%X, \r\n", bme.sensor_data.status);
245+ * }
280246 * }
281247 * }
282248 * @endcode
0 commit comments