From e9937726ec827b819636eb0b7c8850b8919ab525 Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Sat, 9 Apr 2022 19:57:19 +0200 Subject: [PATCH] A little pixel-pushing to make high CO2 numbers look not so much crammed. --- esphome/epaperframe.yaml | 56 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/esphome/epaperframe.yaml b/esphome/epaperframe.yaml index 1340db5..a95fa2d 100644 --- a/esphome/epaperframe.yaml +++ b/esphome/epaperframe.yaml @@ -450,21 +450,21 @@ display: } if(livingroom_co2 >=380 && livingroom_co2 <= 20000) { - it.printf(150, 75 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%4.0f", livingroom_co2); - it.print(150, 50 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "ppm"); + it.printf(170, 75 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%4.0f", livingroom_co2); + it.print(175, 50 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "ppm"); } else { - it.print(150, 75 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- "); - it.print(150, 50 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "ppm³"); + it.print(170, 75 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- "); + it.print(175, 50 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "ppm³"); } if(livingroom_pm25 < 255 && livingroom_pm25 >=0) { - it.printf(200, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%3d", livingroom_pm25); - it.print(205, 114 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³"); + it.printf(220, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%3d", livingroom_pm25); + it.print(225, 114 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³"); } else { - it.print(200, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- "); - it.print(205, 114 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³"); + it.print(220, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- "); + it.print(225, 114 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³"); } @@ -493,21 +493,21 @@ display: } if(sleepingroom_co2 >=380 && sleepingroom_co2 <= 20000) { - it.printf(150, 75 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%4.0f", sleepingroom_co2); - it.print(150, 50 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "ppm"); + it.printf(170, 75 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%4.0f", sleepingroom_co2); + it.print(175, 50 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "ppm"); } else { - it.print(150, 75 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- "); - it.print(150, 50 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "ppm³"); + it.print(170, 75 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- "); + it.print(175, 50 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "ppm³"); } if(sleepingroom_pm25 < 255 && sleepingroom_pm25 >=0) { - it.printf(200, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%3d", sleepingroom_pm25); - it.print(205, 114 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³"); + it.printf(220, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%3d", sleepingroom_pm25); + it.print(225, 114 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³"); } else { - it.print(200, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- "); - it.print(205, 114 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³"); + it.print(220, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- "); + it.print(225, 114 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³"); } /* Weather */ @@ -733,12 +733,12 @@ display: } if(livingroom_co2 >=380 && livingroom_co2 <= 20000) { - it.printf(150, 75 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%4.0f", livingroom_co2); - it.print(150, 50 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "ppm"); + it.printf(170, 75 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%4.0f", livingroom_co2); + it.print(175, 50 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "ppm"); } else { - it.print(150, 75 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- "); - it.print(150, 50 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "ppm³"); + it.print(170, 75 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- "); + it.print(175, 50 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "ppm³"); } if(livingroom_pm25 < 255 && livingroom_pm25 >=0) { @@ -777,21 +777,21 @@ display: } if(sleepingroom_co2 >=380 && sleepingroom_co2 <= 20000) { - it.printf(150, 75 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%4.0f", sleepingroom_co2); - it.print(150, 50 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "ppm"); + it.printf(170, 75 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%4.0f", sleepingroom_co2); + it.print(175, 50 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "ppm"); } else { - it.print(150, 75 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- "); - it.print(150, 50 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "ppm³"); + it.print(170, 75 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- "); + it.print(175, 50 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "ppm³"); } if(sleepingroom_pm25 < 255 && sleepingroom_pm25 >=0) { - it.printf(200, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%3d", sleepingroom_pm25); - it.print(205, 114 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³"); + it.printf(220, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "%3d", sleepingroom_pm25); + it.print(225, 114 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³"); } else { - it.print(200, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- "); - it.print(205, 114 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³"); + it.print(220, 114 + offsetY, id(big_sensor_font), TextAlign::BASELINE_RIGHT, "- "); + it.print(225, 114 + offsetY, id(sensor_unit), TextAlign::BASELINE_LEFT, "µg/m³"); } */