Browse Source

Merge pull request #3393 from luhuadong/develop

[Sensor] Modified vendor name and add two prefix corresponding to sensor types
Bernard Xiong 5 years ago
parent
commit
4bec714516
2 changed files with 4 additions and 2 deletions
  1. 3 1
      components/drivers/sensors/sensor.c
  2. 1 1
      components/drivers/sensors/sensor.h

+ 3 - 1
components/drivers/sensors/sensor.c

@@ -31,7 +31,9 @@ static char *const sensor_name_str[] =
     "tvoc_",     /* TVOC Level        */
     "tvoc_",     /* TVOC Level        */
     "noi_",      /* Noise Loudness    */
     "noi_",      /* Noise Loudness    */
     "step_",     /* Step sensor       */
     "step_",     /* Step sensor       */
-    "forc_"      /* Force sensor      */
+    "forc_",     /* Force sensor      */
+    "dust_",     /* Dust sensor       */
+    "eco2_"      /* eCO2 sensor       */
 };
 };
 
 
 /* Sensor interrupt correlation function */
 /* Sensor interrupt correlation function */

+ 1 - 1
components/drivers/sensors/sensor.h

@@ -58,7 +58,7 @@ extern "C" {
 #define RT_SENSOR_VENDOR_GOERTEK       (5)  /* Goertek */
 #define RT_SENSOR_VENDOR_GOERTEK       (5)  /* Goertek */
 #define RT_SENSOR_VENDOR_MIRAMEMS      (6)  /* MiraMEMS */
 #define RT_SENSOR_VENDOR_MIRAMEMS      (6)  /* MiraMEMS */
 #define RT_SENSOR_VENDOR_DALLAS        (7)  /* Dallas */
 #define RT_SENSOR_VENDOR_DALLAS        (7)  /* Dallas */
-#define RT_SENSOR_VENDOR_AOSONG        (8)  /* Aosong */
+#define RT_SENSOR_VENDOR_ASAIR         (8)  /* Aosong */
 #define RT_SENSOR_VENDOR_SHARP         (9)  /* Sharp */
 #define RT_SENSOR_VENDOR_SHARP         (9)  /* Sharp */
 #define RT_SENSOR_VENDOR_SENSIRION     (10) /* Sensirion */
 #define RT_SENSOR_VENDOR_SENSIRION     (10) /* Sensirion */