Merge pull request #3678 from luhuadong/develop

[Sensor] Add Plantower sensor info
This commit is contained in:
Bernard Xiong 2020-06-11 23:59:04 +08:00 committed by GitHub
commit b2e30a7efe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -61,7 +61,8 @@ extern "C" {
#define RT_SENSOR_VENDOR_ASAIR (8) /* Aosong */
#define RT_SENSOR_VENDOR_SHARP (9) /* Sharp */
#define RT_SENSOR_VENDOR_SENSIRION (10) /* Sensirion */
#define RT_SENSOR_VENDOR_TI (11) /* Texas Instruments*/
#define RT_SENSOR_VENDOR_TI (11) /* Texas Instruments */
#define RT_SENSOR_VENDOR_PLANTOWER (12) /* Plantower */
/* Sensor unit types */

View File

@ -329,6 +329,12 @@ static void sensor(int argc, char **argv)
case RT_SENSOR_VENDOR_SENSIRION:
rt_kprintf("vendor :Sensirion\n");
break;
case RT_SENSOR_VENDOR_TI:
rt_kprintf("vendor :Texas Instruments\n");
break;
case RT_SENSOR_VENDOR_PLANTOWER:
rt_kprintf("vendor :Plantower\n");
break;
}
rt_kprintf("model :%s\n", info.model);
switch (info.unit)