1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

sys/phydat: Added unit decibel-milliwatts

This commit is contained in:
Marian Buschsieweke 2018-11-02 13:46:04 +01:00
parent f6043e048e
commit a04001d781
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F
2 changed files with 3 additions and 0 deletions

View File

@ -94,6 +94,7 @@ enum {
UNIT_A, /**< Ampere */
UNIT_V, /**< Volts */
UNIT_GS, /**< gauss */
UNIT_DBM, /**< decibel-milliwatts */
/* pressure */
UNIT_BAR, /**< Beer? */
UNIT_PA, /**< Pascal */

View File

@ -42,6 +42,7 @@ void phydat_dump(phydat_t *data, uint8_t dim)
case UNIT_PERCENT:
case UNIT_TEMP_C:
case UNIT_TEMP_F:
case UNIT_DBM:
/* no string conversion */
scale_prefix = '\0';
break;
@ -91,6 +92,7 @@ const char *phydat_unit_to_str(uint8_t unit)
case UNIT_GR: return "G";
case UNIT_A: return "A";
case UNIT_V: return "V";
case UNIT_DBM: return "dBm";
case UNIT_GS: return "Gs";
case UNIT_BAR: return "Bar";
case UNIT_PA: return "Pa";