Merge branch 'develop' into hotfix/ignore-parameter-out-of-range

This commit is contained in:
Phat Nguyen
2024-07-24 20:24:27 +07:00
committed by GitHub

View File

@ -296,12 +296,12 @@ void OledDisplay::showDashboard(const char *status) {
DISP()->drawStr(1, 61, "ppm"); DISP()->drawStr(1, 61, "ppm");
/** Draw vertical line */ /** Draw vertical line */
DISP()->drawLine(45, 14, 45, 64); DISP()->drawLine(52, 14, 52, 64);
DISP()->drawLine(82, 14, 82, 64); DISP()->drawLine(97, 14, 97, 64);
/** Draw PM2.5 label */ /** Draw PM2.5 label */
DISP()->setFont(u8g2_font_t0_12_tf); DISP()->setFont(u8g2_font_t0_12_tf);
DISP()->drawStr(48, 27, "PM2.5"); DISP()->drawStr(55, 27, "PM2.5");
/** Draw PM2.5 value */ /** Draw PM2.5 value */
DISP()->setFont(u8g2_font_t0_22b_tf); DISP()->setFont(u8g2_font_t0_22b_tf);
@ -311,23 +311,23 @@ void OledDisplay::showDashboard(const char *status) {
} else { } else {
sprintf(strBuf, "%s", "-"); sprintf(strBuf, "%s", "-");
} }
DISP()->drawStr(48, 48, strBuf); DISP()->drawStr(55, 48, strBuf);
DISP()->setFont(u8g2_font_t0_12_tf); DISP()->setFont(u8g2_font_t0_12_tf);
DISP()->drawUTF8(48, 61, "AQI"); DISP()->drawUTF8(55, 61, "AQI");
} else { } else {
if (utils::isValidPMS(value.pm25_1)) { if (utils::isValidPMS(value.pm25_1)) {
sprintf(strBuf, "%d", value.pm25_1); sprintf(strBuf, "%d", value.pm25_1);
} else { } else {
sprintf(strBuf, "%s", "-"); sprintf(strBuf, "%s", "-");
} }
DISP()->drawStr(48, 48, strBuf); DISP()->drawStr(55, 48, strBuf);
DISP()->setFont(u8g2_font_t0_12_tf); DISP()->setFont(u8g2_font_t0_12_tf);
DISP()->drawUTF8(48, 61, "ug/m³"); DISP()->drawUTF8(55, 61, "ug/m³");
} }
/** Draw tvocIndexlabel */ /** Draw tvocIndexlabel */
DISP()->setFont(u8g2_font_t0_12_tf); DISP()->setFont(u8g2_font_t0_12_tf);
DISP()->drawStr(85, 27, "tvoc:"); DISP()->drawStr(100, 27, "VOC:");
/** Draw tvocIndexvalue */ /** Draw tvocIndexvalue */
if (utils::isValidVOC(value.TVOC)) { if (utils::isValidVOC(value.TVOC)) {
@ -335,7 +335,7 @@ void OledDisplay::showDashboard(const char *status) {
} else { } else {
sprintf(strBuf, "%s", "-"); sprintf(strBuf, "%s", "-");
} }
DISP()->drawStr(85, 39, strBuf); DISP()->drawStr(100, 39, strBuf);
/** Draw NOx label */ /** Draw NOx label */
DISP()->drawStr(85, 53, "NOx:"); DISP()->drawStr(85, 53, "NOx:");
@ -344,7 +344,7 @@ void OledDisplay::showDashboard(const char *status) {
} else { } else {
sprintf(strBuf, "%s", "-"); sprintf(strBuf, "%s", "-");
} }
DISP()->drawStr(85, 63, strBuf); DISP()->drawStr(100, 63, strBuf);
} while (DISP()->nextPage()); } while (DISP()->nextPage());
} else if (ag->isBasic()) { } else if (ag->isBasic()) {
ag->display.clear(); ag->display.clear();