Skip to content

Commit 6ce6f0c

Browse files
sys/phydat: add unit for count per cubic meter
1 parent d25f919 commit 6ce6f0c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

sys/include/phydat.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ enum {
117117
UNIT_TIME, /**< the three dimensions contain sec, min, and hours */
118118
UNIT_DATE, /**< the 3 dimensions contain days, months and years */
119119
/* mass concentration */
120-
UNIT_GPM3 /**< grams per cubic meters */
120+
UNIT_GPM3, /**< grams per cubic meter */
121+
/* number concentration */
122+
UNIT_CPM3 /**< count per cubic meter */
121123
/* extend this list as needed */
122124
};
123125

sys/phydat/phydat_str.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ const char *phydat_unit_to_str(uint8_t unit)
106106
case UNIT_GPM3: return "g/m^3";
107107
case UNIT_F: return "F";
108108
case UNIT_PH: return "pH";
109+
case UNIT_CPM3: return "#/m^3";
110+
109111
default: return "";
110112
}
111113
}

0 commit comments

Comments
 (0)