Skip to content

Commit 329d121

Browse files
Otpvondoiatsxiaoxiang781216
authored andcommitted
sensor: Added 6dof motion and gesture related types.
For details, see: https://developer.android.com/reference/android/hardware/SensorEvent#values Signed-off-by: likun17 <[email protected]>
1 parent 709cbe2 commit 329d121

File tree

2 files changed

+326
-117
lines changed

2 files changed

+326
-117
lines changed

drivers/sensors/sensor.c

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -161,36 +161,51 @@ static const struct sensor_meta_s g_sensor_meta[] =
161161
{0, NULL},
162162
{sizeof(struct sensor_accel), "accel"},
163163
{sizeof(struct sensor_mag), "mag"},
164-
{sizeof(struct sensor_uv), "uv"},
164+
{sizeof(struct sensor_orientation), "orientation"},
165165
{sizeof(struct sensor_gyro), "gyro"},
166166
{sizeof(struct sensor_light), "light"},
167167
{sizeof(struct sensor_baro), "baro"},
168168
{sizeof(struct sensor_noise), "noise"},
169169
{sizeof(struct sensor_prox), "prox"},
170170
{sizeof(struct sensor_rgb), "rgb"},
171-
{sizeof(struct sensor_hall), "hall"},
172-
{sizeof(struct sensor_ir), "ir"},
171+
{sizeof(struct sensor_accel), "linear_accel"},
172+
{sizeof(struct sensor_rotation), "rotation"},
173173
{sizeof(struct sensor_humi), "humi"},
174174
{sizeof(struct sensor_temp), "temp"},
175175
{sizeof(struct sensor_pm25), "pm25"},
176176
{sizeof(struct sensor_pm1p0), "pm1p0"},
177177
{sizeof(struct sensor_pm10), "pm10"},
178-
{sizeof(struct sensor_co2), "co2"},
179-
{sizeof(struct sensor_hcho), "hcho"},
180-
{sizeof(struct sensor_tvoc), "tvoc"},
178+
{sizeof(struct sensor_event), "motion_detect"},
179+
{sizeof(struct sensor_event), "step_detector"},
180+
{sizeof(struct sensor_step_counter), "step_counter"},
181181
{sizeof(struct sensor_ph), "ph"},
182182
{sizeof(struct sensor_hrate), "hrate"},
183+
{sizeof(struct sensor_event), "tilt_detector"},
184+
{sizeof(struct sensor_event), "wake_gesture"},
185+
{sizeof(struct sensor_event), "glance_gesture"},
186+
{sizeof(struct sensor_event), "pickup_gesture"},
187+
{sizeof(struct sensor_event), "wrist_tilt"},
188+
{sizeof(struct sensor_orientation), "device_orientation"},
189+
{sizeof(struct sensor_pose_6dof), "pose_6dof"},
190+
{sizeof(struct sensor_gas), "gas"},
191+
{sizeof(struct sensor_event), "significant_motion"},
192+
{sizeof(struct sensor_hbeat), "hbeat"},
193+
{sizeof(struct sensor_force), "force"},
194+
{sizeof(struct sensor_hall), "hall"},
195+
{sizeof(struct sensor_event), "offbody_detector"},
196+
{sizeof(struct sensor_uv), "uv"},
197+
{sizeof(struct sensor_angle), "hinge_angle"},
198+
{sizeof(struct sensor_ir), "ir"},
199+
{sizeof(struct sensor_hcho), "hcho"},
200+
{sizeof(struct sensor_tvoc), "tvoc"},
183201
{sizeof(struct sensor_dust), "dust"},
184-
{sizeof(struct sensor_wake_gesture), "wake_gesture"},
185202
{sizeof(struct sensor_ecg), "ecg"},
186203
{sizeof(struct sensor_ppgd), "ppgd"},
187204
{sizeof(struct sensor_ppgq), "ppgq"},
188205
{sizeof(struct sensor_impd), "impd"},
189206
{sizeof(struct sensor_ots), "ots"},
190-
{sizeof(struct sensor_gas), "gas"},
207+
{sizeof(struct sensor_co2), "co2"},
191208
{sizeof(struct sensor_cap), "cap"},
192-
{sizeof(struct sensor_hbeat), "hbeat"},
193-
{sizeof(struct sensor_force), "force"},
194209
{sizeof(struct sensor_gnss), "gnss"},
195210
{sizeof(struct sensor_gnss_satellite), "gnss_satellite"},
196211
{sizeof(struct sensor_gnss_measurement), "gnss_measurement"},

0 commit comments

Comments
 (0)