mirror of
https://codeberg.org/mclemens/hr50-remote-display.git
synced 2024-09-27 22:06:09 -04:00
added hr50_fonts.h
This commit is contained in:
parent
5fabfd6eb5
commit
f3d591aed6
@ -3,11 +3,13 @@
|
||||
#include "Arduino.h"
|
||||
#include "heltec.h"
|
||||
#include <ArduinoJson.h>
|
||||
#include "hr50_fonts.h"
|
||||
|
||||
const char* ssid = "<WIFI-SSID>";
|
||||
const char* password = "<WIFI-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();
|
||||
|
Loading…
Reference in New Issue
Block a user