Merge pull request #4181 from Prry/develop
[sensor] support TOF sensor class
This commit is contained in:
commit
10823e54b4
|
@ -35,7 +35,8 @@ static char *const sensor_name_str[] =
|
|||
"forc_", /* Force sensor */
|
||||
"dust_", /* Dust sensor */
|
||||
"eco2_", /* eCO2 sensor */
|
||||
"gnss_" /* GPS/GNSS sensor */
|
||||
"gnss_", /* GPS/GNSS sensor */
|
||||
"tof_" /* TOF sensor */
|
||||
};
|
||||
|
||||
/* Sensor interrupt correlation function */
|
||||
|
|
|
@ -48,6 +48,7 @@ extern "C" {
|
|||
#define RT_SENSOR_CLASS_DUST (14) /* Dust sensor */
|
||||
#define RT_SENSOR_CLASS_ECO2 (15) /* eCO2 sensor */
|
||||
#define RT_SENSOR_CLASS_GNSS (16) /* GPS/GNSS sensor */
|
||||
#define RT_SENSOR_CLASS_TOF (17) /* TOF sensor */
|
||||
|
||||
/* Sensor vendor types */
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ static void sensor_show_data(rt_size_t num, rt_sensor_t sensor, struct rt_sensor
|
|||
LOG_I("num:%3d, light:%5d lux, timestamp:%5d", num, sensor_data->data.light, sensor_data->timestamp);
|
||||
break;
|
||||
case RT_SENSOR_CLASS_PROXIMITY:
|
||||
case RT_SENSOR_CLASS_TOF:
|
||||
LOG_I("num:%3d, distance:%5d, timestamp:%5d", num, sensor_data->data.proximity, sensor_data->timestamp);
|
||||
break;
|
||||
case RT_SENSOR_CLASS_HR:
|
||||
|
|
Loading…
Reference in New Issue