Selaa lähdekoodia

[sensor] change heart rate unit form 'HZ' to 'bpm'.

guozhanxin 6 vuotta sitten
vanhempi
commit
3d9c306454
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      components/drivers/sensors/sensor.h

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

@@ -67,6 +67,7 @@ extern "C" {
 #define  RT_SENSOR_UNIT_DCELSIUS       (8)  /* Temperature             unit: dCelsius   */
 #define  RT_SENSOR_UNIT_HZ             (9)  /* Frequency               unit: HZ         */
 #define  RT_SENSOR_UNIT_ONE            (10) /* Dimensionless quantity  unit: 1          */
+#define  RT_SENSOR_UNIT_BPM            (11) /* Heart rate              unit: bpm        */
 
 /* Sensor communication interface types */
 
@@ -176,7 +177,7 @@ struct rt_sensor_data
         rt_int32_t           baro;          /* Pressure.            unit: pascal (Pa) */
         rt_int32_t           light;         /* Light.               unit: lux         */
         rt_int32_t           proximity;     /* Distance.            unit: centimeters */
-        rt_int32_t           hr;            /* Heat rate.           unit: HZ          */
+        rt_int32_t           hr;            /* Heart rate.          unit: bpm         */
         rt_int32_t           tvoc;          /* TVOC.                unit: permillage  */
         rt_int32_t           noise;         /* Noise Loudness.      unit: HZ          */
         rt_uint32_t          step;          /* Step sensor.         unit: 1           */