Fixed bug with N/A value display in PM2.5 sensor display.
This commit is contained in:
parent
7db5ff465a
commit
6d59b62497
@ -415,11 +415,10 @@ display:
|
|||||||
if(livingroom_pm25 < 255 && livingroom_pm25 >=0) {
|
if(livingroom_pm25 < 255 && livingroom_pm25 >=0) {
|
||||||
it.printf(200, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%3d", livingroom_pm25);
|
it.printf(200, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%3d", livingroom_pm25);
|
||||||
it.print(205, 114 + offsetY, id(big_sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³");
|
it.print(205, 114 + offsetY, id(big_sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³");
|
||||||
}
|
|
||||||
|
|
||||||
if(livingroom_pm25 >= pm25_danger_thres) {
|
if(livingroom_pm25 >= pm25_danger_thres) {
|
||||||
it.print(37, 114 + offsetY, id(mdi_med), TextAlign::BASELINE_CENTER, ""); // warning
|
it.print(37, 114 + offsetY, id(mdi_med), TextAlign::BASELINE_CENTER, ""); // warning
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
it.print(200, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- ");
|
it.print(200, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- ");
|
||||||
it.print(205, 114 + offsetY, id(big_sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³");
|
it.print(205, 114 + offsetY, id(big_sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³");
|
||||||
@ -461,11 +460,10 @@ display:
|
|||||||
if(sleepingroom_pm25 < 255 && sleepingroom_pm25 >=0) {
|
if(sleepingroom_pm25 < 255 && sleepingroom_pm25 >=0) {
|
||||||
it.printf(200, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%3d", sleepingroom_pm25);
|
it.printf(200, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%3d", sleepingroom_pm25);
|
||||||
it.print(205, 114 + offsetY, id(big_sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³");
|
it.print(205, 114 + offsetY, id(big_sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³");
|
||||||
}
|
|
||||||
|
|
||||||
if(sleepingroom_pm25 >= pm25_danger_thres) {
|
if(sleepingroom_pm25 >= pm25_danger_thres) {
|
||||||
it.print(37, 114 + offsetY, id(mdi_med), TextAlign::BASELINE_CENTER, ""); // warning
|
it.print(37, 114 + offsetY, id(mdi_med), TextAlign::BASELINE_CENTER, ""); // warning
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
it.print(200, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- ");
|
it.print(200, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- ");
|
||||||
it.print(205, 114 + offsetY, id(big_sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³");
|
it.print(205, 114 + offsetY, id(big_sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³");
|
||||||
|
Loading…
Reference in New Issue
Block a user