display.cpp: fix field width BME

This commit is contained in:
Verkehrsrot 2019-07-25 23:22:09 +02:00
parent 837988081e
commit 4be814338f

View File

@ -338,16 +338,16 @@ void draw_page(time_t t, uint8_t page) {
#if (HAS_BME) #if (HAS_BME)
// line 2-3: Temp // line 2-3: Temp
snprintf(buff, sizeof(buff), "TMP:%-4.1f", bme_status.temperature); snprintf(buff, sizeof(buff), "TMP:%-2.1f", bme_status.temperature);
u8x8.draw2x2String(0, 2, buff); u8x8.draw2x2String(0, 2, buff);
// line 4-5: Hum // line 4-5: Hum
snprintf(buff, sizeof(buff), "HUM:%-4.1f", bme_status.humidity); snprintf(buff, sizeof(buff), "HUM:%-2.1f", bme_status.humidity);
u8x8.draw2x2String(0, 4, buff); u8x8.draw2x2String(0, 4, buff);
#ifdef HAS_BME680 #ifdef HAS_BME680
// line 6-7: IAQ // line 6-7: IAQ
snprintf(buff, sizeof(buff), "IAQ:%-4.1f", bme_status.iaq); snprintf(buff, sizeof(buff), "IAQ:%-3.0f", bme_status.iaq);
u8x8.draw2x2String(0, 6, buff); u8x8.draw2x2String(0, 6, buff);
#endif #endif