Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
barn53 committed Mar 19, 2021
1 parent 761fe10 commit db5edbf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
40 changes: 18 additions & 22 deletions source/src/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion source/src/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit db5edbf

Please sign in to comment.