5050/* Device naming ************************************************************/
5151
5252#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"
5554#define TIMING_BUF_ESIZE (sizeof(uint32_t))
5655
5756/****************************************************************************
@@ -168,16 +167,16 @@ static const struct sensor_meta_s g_sensor_meta[] =
168167 {sizeof (struct sensor_gyro ), "gyro" },
169168 {sizeof (struct sensor_light ), "light" },
170169 {sizeof (struct sensor_baro ), "baro" },
171- {sizeof (struct sensor_noise ), "noise " },
170+ {sizeof (struct sensor_temp ), "temp " },
172171 {sizeof (struct sensor_prox ), "prox" },
173172 {sizeof (struct sensor_rgb ), "rgb" },
174173 {sizeof (struct sensor_accel ), "linear_accel" },
175174 {sizeof (struct sensor_rotation ), "rotation" },
176175 {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 " },
179178 {sizeof (struct sensor_pm1p0 ), "pm1p0" },
180- {sizeof (struct sensor_pm10 ), "pm10 " },
179+ {sizeof (struct sensor_gyro ), "gyro_uncal " },
181180 {sizeof (struct sensor_event ), "motion_detect" },
182181 {sizeof (struct sensor_event ), "step_detector" },
183182 {sizeof (struct sensor_step_counter ), "step_counter" },
@@ -196,7 +195,7 @@ static const struct sensor_meta_s g_sensor_meta[] =
196195 {sizeof (struct sensor_force ), "force" },
197196 {sizeof (struct sensor_hall ), "hall" },
198197 {sizeof (struct sensor_event ), "offbody_detector" },
199- {sizeof (struct sensor_uv ), "uv " },
198+ {sizeof (struct sensor_accel ), "accel_uncal " },
200199 {sizeof (struct sensor_angle ), "hinge_angle" },
201200 {sizeof (struct sensor_ir ), "ir" },
202201 {sizeof (struct sensor_hcho ), "hcho" },
@@ -215,6 +214,10 @@ static const struct sensor_meta_s g_sensor_meta[] =
215214 {sizeof (struct sensor_gnss_clock ), "gnss_clock" },
216215 {sizeof (struct sensor_gnss_geofence_event ), "gnss_geofence_event" },
217216 {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" },
218221};
219222
220223static const struct file_operations g_sensor_fops =
@@ -1255,7 +1258,6 @@ int sensor_register(FAR struct sensor_lowerhalf_s *lower, int devno)
12551258
12561259 snprintf (path , PATH_MAX , DEVNAME_FMT ,
12571260 g_sensor_meta [lower -> type ].name ,
1258- lower -> uncalibrated ? DEVNAME_UNCAL : "" ,
12591261 devno );
12601262 ret = sensor_custom_register (lower , path ,
12611263 g_sensor_meta [lower -> type ].esize );
@@ -1403,7 +1405,6 @@ void sensor_unregister(FAR struct sensor_lowerhalf_s *lower, int devno)
14031405
14041406 snprintf (path , PATH_MAX , DEVNAME_FMT ,
14051407 g_sensor_meta [lower -> type ].name ,
1406- lower -> uncalibrated ? DEVNAME_UNCAL : "" ,
14071408 devno );
14081409 sensor_custom_unregister (lower , path );
14091410 lib_put_pathbuffer (path );
0 commit comments