From f3d591aed62e44bcfcb48f14f76369d629c1b7f1 Mon Sep 17 00:00:00 2001 From: Michael Clemens Date: Fri, 12 Nov 2021 08:23:34 +0100 Subject: [PATCH] added hr50_fonts.h --- hr50-remote-display.ino | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hr50-remote-display.ino b/hr50-remote-display.ino index a91d148..dcc7870 100644 --- a/hr50-remote-display.ino +++ b/hr50-remote-display.ino @@ -3,11 +3,13 @@ #include "Arduino.h" #include "heltec.h" #include +#include "hr50_fonts.h" const char* ssid = ""; const char* password = ""; String api_url = "http://192.168.99.193:5000/status"; + int first_row = 0; int second_row = 24; int third_row = 48; @@ -15,13 +17,13 @@ int third_row = 48; void setup() { Heltec.begin(true /*DisplayEnable Enable*/, false /*LoRa Disable*/, false /*Serial Enable*/); Heltec.display->flipScreenVertically(); + Heltec.display->setFont(DialogInput_plain_16); WiFi.begin(ssid, password); delay(4000); } void printError(String err){ Heltec.display->clear(); - Heltec.display->setFont(DialogInput_plain_16); Heltec.display->setTextAlignment(TEXT_ALIGN_LEFT); Heltec.display->drawString(0, second_row, err ); Heltec.display->display(); @@ -62,7 +64,6 @@ void loop() { // clear the display Heltec.display->clear(); - Heltec.display->setFont(DialogInput_plain_16); // print left column Heltec.display->setTextAlignment(TEXT_ALIGN_LEFT); Heltec.display->drawString(0, first_row, band ); @@ -80,7 +81,6 @@ void loop() { // print a "(!)" centered in the third row // this happens when the TRX/PA is transmitting // or otherwise an empty response was send by the API - Heltec.display->setFont(DialogInput_plain_16); Heltec.display->setTextAlignment(TEXT_ALIGN_LEFT); Heltec.display->drawString(58, third_row, "(!)" ); Heltec.display->display(); @@ -89,4 +89,4 @@ void loop() { else { printError("No WiFi!"); } -} +} \ No newline at end of file