You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "simonatoaca (via GitHub)" <gi...@apache.org> on 2023/07/27 18:19:43 UTC

[GitHub] [nuttx] simonatoaca commented on a diff in pull request #9916: drivers: Added support for BME680

simonatoaca commented on code in PR #9916:
URL: https://github.com/apache/nuttx/pull/9916#discussion_r1276660878


##########
include/nuttx/sensors/sensor.h:
##########
@@ -595,6 +603,15 @@ struct sensor_cap           /* Type: Capacitance */
   int32_t rawdata[4];       /* in SI units pF */
 };
 
+struct sensor_gas           /* Type: Gas */
+{
+  uint64_t timestamp;       /* Units is microseconds */
+  float temperature;        /* Temperature in degrees Celsius */
+  float pressure;           /* Pressure in millibar or hPa */
+  float humidity;           /* Relative humidity in rH */

Review Comment:
   I did not know how to do that. I thought there has to be a struct associated with the type of sensor, as declared in the g_sensor_info array. Also, using 2 structs wouldn t mean having the timestamp twice? I would appreciate it if you could give me a hint as to how i could reuse sensor_baro and sensor_humi.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org