Merge pull request #3738 from luhuadong/develop
[Sensor] Add AMS sensor vendor info
This commit is contained in:
commit
7e5373e733
|
@ -63,6 +63,7 @@ extern "C" {
|
|||
#define RT_SENSOR_VENDOR_SENSIRION (10) /* Sensirion */
|
||||
#define RT_SENSOR_VENDOR_TI (11) /* Texas Instruments */
|
||||
#define RT_SENSOR_VENDOR_PLANTOWER (12) /* Plantower */
|
||||
#define RT_SENSOR_VENDOR_AMS (13) /* ams AG */
|
||||
|
||||
|
||||
/* Sensor unit types */
|
||||
|
@ -81,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 */
|
||||
|
||||
|
|
|
@ -335,6 +335,9 @@ static void sensor(int argc, char **argv)
|
|||
case RT_SENSOR_VENDOR_PLANTOWER:
|
||||
rt_kprintf("vendor :Plantower\n");
|
||||
break;
|
||||
case RT_SENSOR_VENDOR_AMS:
|
||||
rt_kprintf("vendor :AMS\n");
|
||||
break;
|
||||
}
|
||||
rt_kprintf("model :%s\n", info.model);
|
||||
switch (info.unit)
|
||||
|
@ -381,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