sys/phydat: Added unit decibel-milliwatts
This commit is contained in:
parent
f6043e048e
commit
a04001d781
@ -94,6 +94,7 @@ enum {
|
|||||||
UNIT_A, /**< Ampere */
|
UNIT_A, /**< Ampere */
|
||||||
UNIT_V, /**< Volts */
|
UNIT_V, /**< Volts */
|
||||||
UNIT_GS, /**< gauss */
|
UNIT_GS, /**< gauss */
|
||||||
|
UNIT_DBM, /**< decibel-milliwatts */
|
||||||
/* pressure */
|
/* pressure */
|
||||||
UNIT_BAR, /**< Beer? */
|
UNIT_BAR, /**< Beer? */
|
||||||
UNIT_PA, /**< Pascal */
|
UNIT_PA, /**< Pascal */
|
||||||
|
|||||||
@ -42,6 +42,7 @@ void phydat_dump(phydat_t *data, uint8_t dim)
|
|||||||
case UNIT_PERCENT:
|
case UNIT_PERCENT:
|
||||||
case UNIT_TEMP_C:
|
case UNIT_TEMP_C:
|
||||||
case UNIT_TEMP_F:
|
case UNIT_TEMP_F:
|
||||||
|
case UNIT_DBM:
|
||||||
/* no string conversion */
|
/* no string conversion */
|
||||||
scale_prefix = '\0';
|
scale_prefix = '\0';
|
||||||
break;
|
break;
|
||||||
@ -91,6 +92,7 @@ const char *phydat_unit_to_str(uint8_t unit)
|
|||||||
case UNIT_GR: return "G";
|
case UNIT_GR: return "G";
|
||||||
case UNIT_A: return "A";
|
case UNIT_A: return "A";
|
||||||
case UNIT_V: return "V";
|
case UNIT_V: return "V";
|
||||||
|
case UNIT_DBM: return "dBm";
|
||||||
case UNIT_GS: return "Gs";
|
case UNIT_GS: return "Gs";
|
||||||
case UNIT_BAR: return "Bar";
|
case UNIT_BAR: return "Bar";
|
||||||
case UNIT_PA: return "Pa";
|
case UNIT_PA: return "Pa";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user