Browse Source

sys/phydat: adding illuminance unit (Lux)

pr/spi.typo
Alexandre Abadie 7 years ago
parent
commit
e2e3704973
  1. 2
      sys/include/phydat.h
  2. 1
      sys/phydat/phydat_str.c

2
sys/include/phydat.h

@ -79,6 +79,8 @@ enum {
UNIT_TEMP_C, /**< degree Celsius */
UNIT_TEMP_F, /**< degree Fahrenheit */
UNIT_TEMP_K, /**< Kelvin */
/* illuminance */
UNIT_LUX, /**< Lux (lx) */
/* dimension */
UNIT_M, /**< meters */
UNIT_M2, /**< square meters */

1
sys/phydat/phydat_str.c

@ -62,6 +62,7 @@ const char *phydat_unit_to_str(uint8_t unit)
case UNIT_TEMP_C: return "°C";
case UNIT_TEMP_F: return "°F";
case UNIT_TEMP_K: return "K";
case UNIT_LUX: return "lx";
case UNIT_M: return "m";
case UNIT_G: return "g";
case UNIT_DPS: return "dps";

Loading…
Cancel
Save