From ccb613fc05bd3b84bddfb2df4adafef563b7532e Mon Sep 17 00:00:00 2001 From: Doxygen CI Date: Fri, 3 Mar 2023 16:04:13 +0000 Subject: [PATCH] Deploy docs to GitHub Pages from commit 355dde33b0 Commit: 355dde33b05f6345ceaf383e599752a227bec939 GitHub Actions run: 4325117746 --- html/_adafruit___sensor_8h_source.html | 12 ++++---- html/functions.html | 6 ++++ html/functions_vars.html | 10 +++++++ html/menudata.js | 1 + html/search/all_2.js | 1 + html/search/all_4.js | 1 + html/search/searchdata.js | 2 +- html/search/variables_10.js | 2 +- html/search/variables_11.js | 2 +- html/search/variables_12.html | 26 +++++++++++++++++ html/search/variables_12.js | 4 +++ html/search/variables_2.js | 1 + html/search/variables_4.js | 3 +- html/search/variables_5.js | 3 +- html/search/variables_6.js | 2 +- html/search/variables_7.js | 5 +--- html/search/variables_8.js | 6 ++-- html/search/variables_9.js | 3 +- html/search/variables_a.js | 3 +- html/search/variables_b.js | 9 ++---- html/search/variables_c.js | 9 ++++-- html/search/variables_d.js | 6 ++-- html/search/variables_e.js | 8 +++--- html/search/variables_f.js | 5 +++- html/structsensors__event__t-members.html | 10 ++++--- html/structsensors__event__t.html | 34 +++++++++++++++++++++++ 26 files changed, 130 insertions(+), 44 deletions(-) create mode 100644 html/search/variables_12.html create mode 100644 html/search/variables_12.js diff --git a/html/_adafruit___sensor_8h_source.html b/html/_adafruit___sensor_8h_source.html index 52cddc0..e99eb17 100644 --- a/html/_adafruit___sensor_8h_source.html +++ b/html/_adafruit___sensor_8h_source.html @@ -62,15 +62,15 @@ $(function() {
Adafruit_Sensor.h
-
1 /*
2  * Copyright (C) 2008 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software< /span>
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /* Update by K. Townsend (Adafruit Industries) for lighter typedefs, and
18  * extended sensor support to include color, voltage and current */
19 
20 #ifndef _ADAFRUIT_SENSOR_H
21 #define _ADAFRUIT_SENSOR_H
22 
23 #ifndef ARDUINO
24 #include <stdint.h>
25 #elif ARDUINO >= 100
26 #include "Arduino.h"
27 #include "Print.h"
28 #else
29 #include "WProgram.h"
30 #endif
31 
32 /* Constants */
33 #define SENSORS_GRAVITY_EARTH (9.80665F)
34 #define SENSORS_GRAVITY_MOON (1.6F)
35 #define SENSORS_GRAVITY_SUN (275.0F)
36 #define SENSORS_GRAVITY_STANDARD (SENSORS_GRAVITY_EARTH)
37 #define SENSORS_MAGFIELD_EARTH_MAX \
38  (60.0F)
39 #define SENSORS_MAGFIELD_EARTH_MIN \
40  (30.0F)
41 #define SENSORS_PRESSURE_SEALEVELHPA \
42  (1013.25F)
43 #define SENSORS_DPS_TO_RADS \
44  (0.017453293F)
46 #define SENSORS_RADS_TO_DPS \
47  (57.29577793F)
48 #define SENSORS_GAUSS_TO_MICROTESLA \
49  (100)
52 typedef enum {
53  SENSOR_TYPE_ACCELEROMETER = (1),
54  SENSOR_TYPE_MAGNETIC_FIELD = (2),
55  SENSOR_TYPE_ORIENTATION = (3),
56  SENSOR_TYPE_GYROSCOPE = (4),
57  SENSOR_TYPE_LIGHT = (5),
58  SENSOR_TYPE_PRESSURE = (6),
59  SENSOR_TYPE_PROXIMITY = (8),
60  SENSOR_TYPE_GRAVITY = (9),
61  SENSOR_TYPE_LINEAR_ACCELERATION =
62  (10),
63  SENSOR_TYPE_ROTATION_VECTOR = (11),
64  SENSOR_TYPE_RELATIVE_HUMIDITY = (12),
65  SENSOR_TYPE_AMBIENT_TEMPERATURE = (13),
66  SENSOR_TYPE_OBJECT_TEMPERATURE = (14),
67  SENSOR_TYPE_VOLTAGE = (15),
68  SENSOR_TYPE_CURRENT = (16),
69  SENSOR_TYPE_COLOR = (17),
70  SENSOR_TYPE_TVOC = (18),
71  SENSOR_TYPE_VOC_INDEX = (19),
72  SENSOR_TYPE_NOX_INDEX = (20)
73 } sensors_type_t;
74 
76 typedef struct {
77  union {
78  float v[3];
79  struct {
80  float x;
81  float y;
82  float z;
83  };
84  /* Orientation sensors */
85  struct {
86  float roll;
89  float pitch;
92  float heading;
95  };
96  };
97  int8_t status;
99  uint8_t reserved[3];
101 
103 typedef struct {
104  union {
105  float c[3];
106  /* RGB color space */
107  struct {
108  float r;
109  float g;
110  float b;
111  };
112  };
113  uint32_t rgba;
115 
116 /* Sensor event (36 bytes) */
119 typedef struct {
120  int32_t version;
121  int32_t sensor_id;
122  int32_t type;
123  int32_t reserved0;
124  int32_t timestamp;
125  union {
126  float data[4];
127  sensors_vec_t acceleration;
130  magnetic;
131  sensors_vec_t orientation;
133  float temperature;
134  float distance;
135  float light;
136  float pressure;
137  float relative_humidity;
138  float current;
139  float voltage;
140  float tvoc;
141  float voc_index;
143  float nox_index;
145  sensors_color_t color;
146  };
148 
149 /* Sensor details (40 bytes) */
152 typedef struct {
153  char name[12];
154  int32_t version;
155  int32_t sensor_id;
156  int32_t type;
157  float max_value;
158  float min_value;
159  float resolution;
161  int32_t min_delay;
163 } sensor_t;
164 
169 class Adafruit_Sensor {
170 public:
171  // Constructor(s)
172  Adafruit_Sensor() {}
173  virtual ~Adafruit_Sensor() {}
174 
175  // These must be defined by the subclass
176 
180  virtual void enableAutoRange(bool enabled) {
181  (void)enabled; /* suppress unused warning */
182  };
183 
186  virtual bool getEvent(sensors_event_t *) = 0;
188  virtual void getSensor(sensor_t *) = 0;
189 
190  void printSensorDetails(void);
191 
192 private:
193  bool _autoRange;
194 };
195 
196 #endif
Definition: Adafruit_Sensor.h:77
-
Common sensor interface to unify various sensors. Intentionally modeled after sensors.h in the Android API: https://github.com/android/platform_hardware_libhardware/blob/master/include/hardware/sensors.h.
Definition: Adafruit_Sensor.h:170
+
1 /*
2  * Copyright (C) 2008 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software< /span>
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /* Update by K. Townsend (Adafruit Industries) for lighter typedefs, and
18  * extended sensor support to include color, voltage and current */
19 
20 #ifndef _ADAFRUIT_SENSOR_H
21 #define _ADAFRUIT_SENSOR_H
22 
23 #ifndef ARDUINO
24 #include <stdint.h>
25 #elif ARDUINO >= 100
26 #include "Arduino.h"
27 #include "Print.h"
28 #else
29 #include "WProgram.h"
30 #endif
31 
32 /* Constants */
33 #define SENSORS_GRAVITY_EARTH (9.80665F)
34 #define SENSORS_GRAVITY_MOON (1.6F)
35 #define SENSORS_GRAVITY_SUN (275.0F)
36 #define SENSORS_GRAVITY_STANDARD (SENSORS_GRAVITY_EARTH)
37 #define SENSORS_MAGFIELD_EARTH_MAX \
38  (60.0F)
39 #define SENSORS_MAGFIELD_EARTH_MIN \
40  (30.0F)
41 #define SENSORS_PRESSURE_SEALEVELHPA \
42  (1013.25F)
43 #define SENSORS_DPS_TO_RADS \
44  (0.017453293F)
46 #define SENSORS_RADS_TO_DPS \
47  (57.29577793F)
48 #define SENSORS_GAUSS_TO_MICROTESLA \
49  (100)
52 typedef enum {
53  SENSOR_TYPE_ACCELEROMETER = (1),
54  SENSOR_TYPE_MAGNETIC_FIELD = (2),
55  SENSOR_TYPE_ORIENTATION = (3),
56  SENSOR_TYPE_GYROSCOPE = (4),
57  SENSOR_TYPE_LIGHT = (5),
58  SENSOR_TYPE_PRESSURE = (6),
59  SENSOR_TYPE_PROXIMITY = (8),
60  SENSOR_TYPE_GRAVITY = (9),
61  SENSOR_TYPE_LINEAR_ACCELERATION =
62  (10),
63  SENSOR_TYPE_ROTATION_VECTOR = (11),
64  SENSOR_TYPE_RELATIVE_HUMIDITY = (12),
65  SENSOR_TYPE_AMBIENT_TEMPERATURE = (13),
66  SENSOR_TYPE_OBJECT_TEMPERATURE = (14),
67  SENSOR_TYPE_VOLTAGE = (15),
68  SENSOR_TYPE_CURRENT = (16),
69  SENSOR_TYPE_COLOR = (17),
70  SENSOR_TYPE_TVOC = (18),
71  SENSOR_TYPE_VOC_INDEX = (19),
72  SENSOR_TYPE_NOX_INDEX = (20),
73  SENSOR_TYPE_CO2 = (21),
74  SENSOR_TYPE_eCO2 = (22),
75 } sensors_type_t;
76 
78 typedef struct {
79  union {
80  float v[3];
81  struct {
82  float x;
83  float y;
84  float z;
85  };
86  /* Orientation sensors */
87  struct {
88  float roll;
91  float pitch;
94  float heading;
97  };
98  };
99  int8_t status;
101  uint8_t reserved[3];
103 
105 typedef struct {
106  union {
107  float c[3];
108  /* RGB color space */
109  struct {
110  float r;
111  float g;
112  float b;
113  };
114  };
115  uint32_t rgba;
117 
118 /* Sensor event (36 bytes) */
121 typedef struct {
122  int32_t version;
123  int32_t sensor_id;
124  int32_t type;
125  int32_t reserved0;
126  int32_t timestamp;
127  union {
128  float data[4];
129  sensors_vec_t acceleration;
132  magnetic;
133  sensors_vec_t orientation;
135  float temperature;
136  float distance;
137  float light;
138  float pressure;
139  float relative_humidity;
140  float current;
141  float voltage;
142  float tvoc;
143  float voc_index;
145  float nox_index;
147  float CO2;
148  float eCO2;
150  sensors_color_t color;
151  };
153 
154 /* Sensor details (40 bytes) */
157 typedef struct {
158  char name[12];
159  int32_t version;
160  int32_t sensor_id;
161  int32_t type;
162  float max_value;
163  float min_value;
164  float resolution;
166  int32_t min_delay;
168 } sensor_t;
169 
174 class Adafruit_Sensor {
175 public:
176  // Constructor(s)
177  Adafruit_Sensor() {}
178  virtual ~Adafruit_Sensor() {}
179 
180  // These must be defined by the subclass
181 
185  virtual void enableAutoRange(bool enabled) {
186  (void)enabled; /* suppress unused warning */
187  };
188 
191  virtual bool getEvent(sensors_event_t *) = 0;
193  virtual void getSensor(sensor_t *) = 0;
194 
195  void printSensorDetails(void);
196 
197 private:
198  bool _autoRange;
199 };
200 
201 #endif
Definition: Adafruit_Sensor.h:79
+
Common sensor interface to unify various sensors. Intentionally modeled after sensors.h in the Android API: https://github.com/android/platform_hardware_libhardware/blob/master/include/hardware/sensors.h.
Definition: Adafruit_Sensor.h:175
virtual bool getEvent(sensors_event_t *)=0
Get the latest sensor event.
void printSensorDetails(void)
Prints sensor information to serial console.
Definition: Adafruit_Sensor.cpp:8
-
Definition: Adafruit_Sensor.h:153
-
Definition: Adafruit_Sensor.h:120
+
Definition: Adafruit_Sensor.h:158
+
Definition: Adafruit_Sensor.h:122
virtual void getSensor(sensor_t *)=0
Get info about the sensor itself.
-
Definition: Adafruit_Sensor.h:104
-
virtual void enableAutoRange(bool enabled)
Whether we should automatically change the range (if possible) for higher precision.
Definition: Adafruit_Sensor.h:181
+
Definition: Adafruit_Sensor.h:106
+
virtual void enableAutoRange(bool enabled)
Whether we should automatically change the range (if possible) for higher precision.
Definition: Adafruit_Sensor.h:186
+

Measured CO2 in parts per million (ppm)

+ +
+ + +

◆ eCO2

+ +
+
+ + + + +
float sensors_event_t::eCO2
+
+

equivalent/estimated CO2 in parts per million (ppm estimated from some other measurement)

+