From 0c52ad48c8a9072490b31a0ce03db1359cbebefc Mon Sep 17 00:00:00 2001 From: Doxygen CI Date: Sun, 31 Jul 2022 20:04:45 +0000 Subject: [PATCH] Deploy docs to GitHub Pages from commit 137b67db45 Commit: 137b67db4569db9f1ed4df2d17b75a8b648390f5 GitHub Actions run: 2770727278 --- html/_adafruit___sensor_8h_source.html | 12 ++++++------ html/functions.html | 3 +++ html/functions_vars.html | 3 +++ html/search/all_e.js | 1 + html/search/variables_d.js | 1 + html/structsensors__event__t-members.html | 7 ++++--- html/structsensors__event__t.html | 17 +++++++++++++++++ 7 files changed, 35 insertions(+), 9 deletions(-) diff --git a/html/_adafruit___sensor_8h_source.html b/html/_adafruit___sensor_8h_source.html index 79b44d6..b5ed3c5 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 } sensors_type_t;
71 
73 typedef struct {
74  union {
75  float v[3];
76  struct {
77  float x;
78  float y;
79  float z;
80  };
81  /* Orientation sensors */
82  struct {
83  float roll;
86  float pitch;
89  float heading;
92  };
93  };
94  int8_t status;
96  uint8_t reserved[3];
98 
100 typedef struct {
101  union {
102  float c[3];
103  /* RGB color space */
104  struct {
105  float r;
106  float g;
107  float b;
108  };
109  };
110  uint32_t rgba;
112 
113 /* Sensor event (36 bytes) */
116 typedef struct {
117  int32_t version;
118  int32_t sensor_id;
119  int32_t type;
120  int32_t reserved0;
121  int32_t timestamp;
122  union {
123  float data[4];
124  sensors_vec_t acceleration;
127  magnetic;
128  sensors_vec_t orientation;
130  float temperature;
131  float distance;
132  float light;
133  float pressure;
134  float relative_humidity;
135  float current;
136  float voltage;
138  };
140 
141 /* Sensor details (40 bytes) */
144 typedef struct {
145  char name[12];
146  int32_t version;
147  int32_t sensor_id;
148  int32_t type;
149  float max_value;
150  float min_value;
151  float resolution;
153  int32_t min_delay;
155 } sensor_t;
156 
161 class Adafruit_Sensor {
162 public:
163  // Constructor(s)
164  Adafruit_Sensor() {}
165  virtual ~Adafruit_Sensor() {}
166 
167  // These must be defined by the subclass
168 
172  virtual void enableAutoRange(bool enabled) {
173  (void)enabled; /* suppress unused warning */
174  };
175 
178  virtual bool getEvent(sensors_event_t *) = 0;
180  virtual void getSensor(sensor_t *) = 0;
181 
182  void printSensorDetails(void);
183 
184 private:
185  bool _autoRange;
186 };
187 
188 #endif
Definition: Adafruit_Sensor.h:74
-
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:162
+
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 } sensors_type_t;
72 
74 typedef struct {
75  union {
76  float v[3];
77  struct {
78  float x;
79  float y;
80  float z;
81  };
82  /* Orientation sensors */
83  struct {
84  float roll;
87  float pitch;
90  float heading;
93  };
94  };
95  int8_t status;
97  uint8_t reserved[3];
99 
101 typedef struct {
102  union {
103  float c[3];
104  /* RGB color space */
105  struct {
106  float r;
107  float g;
108  float b;
109  };
110  };
111  uint32_t rgba;
113 
114 /* Sensor event (36 bytes) */
117 typedef struct {
118  int32_t version;
119  int32_t sensor_id;
120  int32_t type;
121  int32_t reserved0;
122  int32_t timestamp;
123  union {
124  float data[4];
125  sensors_vec_t acceleration;
128  magnetic;
129  sensors_vec_t orientation;
131  float temperature;
132  float distance;
133  float light;
134  float pressure;
135  float relative_humidity;
136  float current;
137  float voltage;
138  float tvoc;
140  };
142 
143 /* Sensor details (40 bytes) */
146 typedef struct {
147  char name[12];
148  int32_t version;
149  int32_t sensor_id;
150  int32_t type;
151  float max_value;
152  float min_value;
153  float resolution;
155  int32_t min_delay;
157 } sensor_t;
158 
163 class Adafruit_Sensor {
164 public:
165  // Constructor(s)
166  Adafruit_Sensor() {}
167  virtual ~Adafruit_Sensor() {}
168 
169  // These must be defined by the subclass
170 
174  virtual void enableAutoRange(bool enabled) {
175  (void)enabled; /* suppress unused warning */
176  };
177 
180  virtual bool getEvent(sensors_event_t *) = 0;
182  virtual void getSensor(sensor_t *) = 0;
183 
184  void printSensorDetails(void);
185 
186 private:
187  bool _autoRange;
188 };
189 
190 #endif
Definition: Adafruit_Sensor.h:75
+
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:164
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:145
-
Definition: Adafruit_Sensor.h:117
+
Definition: Adafruit_Sensor.h:147
+
Definition: Adafruit_Sensor.h:118
virtual void getSensor(sensor_t *)=0
Get info about the sensor itself.
-
Definition: Adafruit_Sensor.h:101
-
virtual void enableAutoRange(bool enabled)
Whether we should automatically change the range (if possible) for higher precision.
Definition: Adafruit_Sensor.h:173
+
Definition: Adafruit_Sensor.h:102
+
virtual void enableAutoRange(bool enabled)
Whether we should automatically change the range (if possible) for higher precision.
Definition: Adafruit_Sensor.h:175