forked from airgradienthq/arduino
Limit show CO2 index within 4 character number (max = 9999)
This commit is contained in:
1 parent
063612e08f
commit
e47096feac
2 files changed
+9
-1
No files matched your search
@@ -1453,6 +1453,10 @@ static void displayShowDashboard(String err) {
|
||||
/** Show CO2 value */
|
||||
u8g2.setFont(u8g2_font_t0_22b_tf);
|
||||
if (co2Ppm > 0) {
|
||||
int val = 9999;
|
||||
if (co2Ppm < 10000) {
|
||||
val = co2Ppm;
|
||||
}
|
||||
sprintf(strBuf, "%d", co2Ppm);
|
||||
} else {
|
||||
sprintf(strBuf, "%s", "-");
|
||||
|
||||
Reference in new issue
Block a user