[Sensor] Add two concentration unit ppm & ppb
This commit is contained in:
parent
1fde73a93c
commit
f2070beb54
|
@ -82,6 +82,8 @@ extern "C" {
|
|||
#define RT_SENSOR_UNIT_BPM (11) /* Heart rate unit: bpm */
|
||||
#define RT_SENSOR_UNIT_MM (12) /* Distance unit: mm */
|
||||
#define RT_SENSOR_UNIT_MN (13) /* Force unit: mN */
|
||||
#define RT_SENSOR_UNIT_PPM (14) /* Concentration unit: ppm */
|
||||
#define RT_SENSOR_UNIT_PPB (15) /* Concentration unit: ppb */
|
||||
|
||||
/* Sensor communication interface types */
|
||||
|
||||
|
|
|
@ -384,6 +384,12 @@ static void sensor(int argc, char **argv)
|
|||
case RT_SENSOR_UNIT_MN:
|
||||
rt_kprintf("unit :mN\n");
|
||||
break;
|
||||
case RT_SENSOR_UNIT_PPM:
|
||||
rt_kprintf("unit :ppm\n");
|
||||
break;
|
||||
case RT_SENSOR_UNIT_PPB:
|
||||
rt_kprintf("unit :ppb\n");
|
||||
break;
|
||||
}
|
||||
rt_kprintf("range_max :%d\n", info.range_max);
|
||||
rt_kprintf("range_min :%d\n", info.range_min);
|
||||
|
|
Loading…
Reference in New Issue