50
50
/* Device naming ************************************************************/
51
51
52
52
#define ROUND_DOWN (x , y ) (((x) / (y)) * (y))
53
- #define DEVNAME_FMT "/dev/uorb/sensor_%s%s%d"
54
- #define DEVNAME_UNCAL "_uncal"
53
+ #define DEVNAME_FMT "/dev/uorb/sensor_%s%d"
55
54
#define TIMING_BUF_ESIZE (sizeof(uint32_t))
56
55
57
56
/****************************************************************************
@@ -168,16 +167,16 @@ static const struct sensor_meta_s g_sensor_meta[] =
168
167
{sizeof (struct sensor_gyro ), "gyro" },
169
168
{sizeof (struct sensor_light ), "light" },
170
169
{sizeof (struct sensor_baro ), "baro" },
171
- {sizeof (struct sensor_noise ), "noise " },
170
+ {sizeof (struct sensor_temp ), "temp " },
172
171
{sizeof (struct sensor_prox ), "prox" },
173
172
{sizeof (struct sensor_rgb ), "rgb" },
174
173
{sizeof (struct sensor_accel ), "linear_accel" },
175
174
{sizeof (struct sensor_rotation ), "rotation" },
176
175
{sizeof (struct sensor_humi ), "humi" },
177
- {sizeof (struct sensor_temp ), "temp " },
178
- {sizeof (struct sensor_pm25 ), "pm25 " },
176
+ {sizeof (struct sensor_temp ), "ambient_temp " },
177
+ {sizeof (struct sensor_mag ), "mag_uncal " },
179
178
{sizeof (struct sensor_pm1p0 ), "pm1p0" },
180
- {sizeof (struct sensor_pm10 ), "pm10 " },
179
+ {sizeof (struct sensor_gyro ), "gyro_uncal " },
181
180
{sizeof (struct sensor_event ), "motion_detect" },
182
181
{sizeof (struct sensor_event ), "step_detector" },
183
182
{sizeof (struct sensor_step_counter ), "step_counter" },
@@ -196,7 +195,7 @@ static const struct sensor_meta_s g_sensor_meta[] =
196
195
{sizeof (struct sensor_force ), "force" },
197
196
{sizeof (struct sensor_hall ), "hall" },
198
197
{sizeof (struct sensor_event ), "offbody_detector" },
199
- {sizeof (struct sensor_uv ), "uv " },
198
+ {sizeof (struct sensor_accel ), "accel_uncal " },
200
199
{sizeof (struct sensor_angle ), "hinge_angle" },
201
200
{sizeof (struct sensor_ir ), "ir" },
202
201
{sizeof (struct sensor_hcho ), "hcho" },
@@ -215,6 +214,10 @@ static const struct sensor_meta_s g_sensor_meta[] =
215
214
{sizeof (struct sensor_gnss_clock ), "gnss_clock" },
216
215
{sizeof (struct sensor_gnss_geofence_event ), "gnss_geofence_event" },
217
216
{sizeof (struct sensor_velocity ), "velocity" },
217
+ {sizeof (struct sensor_noise ), "noise" },
218
+ {sizeof (struct sensor_pm25 ), "pm25" },
219
+ {sizeof (struct sensor_pm10 ), "pm10" },
220
+ {sizeof (struct sensor_uv ), "uv" },
218
221
};
219
222
220
223
static const struct file_operations g_sensor_fops =
@@ -1255,7 +1258,6 @@ int sensor_register(FAR struct sensor_lowerhalf_s *lower, int devno)
1255
1258
1256
1259
snprintf (path , PATH_MAX , DEVNAME_FMT ,
1257
1260
g_sensor_meta [lower -> type ].name ,
1258
- lower -> uncalibrated ? DEVNAME_UNCAL : "" ,
1259
1261
devno );
1260
1262
ret = sensor_custom_register (lower , path ,
1261
1263
g_sensor_meta [lower -> type ].esize );
@@ -1403,7 +1405,6 @@ void sensor_unregister(FAR struct sensor_lowerhalf_s *lower, int devno)
1403
1405
1404
1406
snprintf (path , PATH_MAX , DEVNAME_FMT ,
1405
1407
g_sensor_meta [lower -> type ].name ,
1406
- lower -> uncalibrated ? DEVNAME_UNCAL : "" ,
1407
1408
devno );
1408
1409
sensor_custom_unregister (lower , path );
1409
1410
lib_put_pathbuffer (path );
0 commit comments