From db5edbffabfebc8fec341aef6e351c0ebf0d2ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerd=20M=C3=BCller?= Date: Fri, 19 Mar 2021 23:50:54 +0100 Subject: [PATCH] minor --- source/src/display.cpp | 40 ++++++++++++++++++---------------------- source/src/display.h | 3 ++- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/source/src/display.cpp b/source/src/display.cpp index 96d28bf..f50a822 100644 --- a/source/src/display.cpp +++ b/source/src/display.cpp @@ -692,28 +692,6 @@ void Display::showSettingsQR() } } -void Display::showTest() -{ - m_tft.loadFont(F("NotoSans-Regular50")); - m_tft.fillScreen(RGB(0x00, 0x30, 0x90)); - m_tft.setTextColor(TFT_WHITE, RGB(0x00, 0x30, 0x90)); - - String msg = F("j"); - m_tft.setCursor((DISPLAY_WIDTH - m_tft.textWidth(msg)) / 2, 50); - Serial.println("-------------------"); - m_tft.print(msg); - Serial.println("-------------------"); - - msg = F("x"); - m_tft.setCursor((DISPLAY_WIDTH - m_tft.textWidth(msg)) / 2, 120); - Serial.println("-------------------"); - m_tft.print(msg); - Serial.println("-------------------"); - - m_tft.unloadFont(); - m_last_screen = Screen::API_OK; -} - void Display::showAPIOK() { if (m_last_screen != Screen::API_OK) { @@ -800,6 +778,24 @@ void Display::showNotUpdated() m_tft.unloadFont(); } +void Display::showTest() +{ + m_tft.loadFont(F("NotoSans-Regular50")); + m_tft.fillScreen(RGB(0x00, 0x30, 0x90)); + m_tft.setTextColor(TFT_WHITE, RGB(0x00, 0x30, 0x90)); + + String msg = F("j"); + m_tft.setCursor((DISPLAY_WIDTH - m_tft.textWidth(msg)) / 2, 50); + m_tft.print(msg); + + msg = F("x"); + m_tft.setCursor((DISPLAY_WIDTH - m_tft.textWidth(msg)) / 2, 120); + m_tft.print(msg); + + m_tft.unloadFont(); + m_last_screen = Screen::API_OK; +} + uint16_t read16(File& f) { uint16_t result; diff --git a/source/src/display.h b/source/src/display.h index 972d7d8..de554f4 100644 --- a/source/src/display.h +++ b/source/src/display.h @@ -19,13 +19,14 @@ class Display { void showAPQR(); void showUpdateQR(); void showSettingsQR(); - void showTest(); void showAPIOK(); void showAPIFailed(); void showUpdated(); void showNotUpdated(); + void showTest(); + private: void wifiConnect(); void renderTitle();