mirror of
https://codeberg.org/mclemens/hr50-remote-display.git
synced 2025-01-03 01:16:47 -05:00
code styling
This commit is contained in:
parent
b0b9821f30
commit
0f809ee24b
@ -13,6 +13,8 @@ String api_url = "http://192.168.99.193:5000/status";
|
||||
int first_row = 0;
|
||||
int second_row = 24;
|
||||
int third_row = 48;
|
||||
int left = 0;
|
||||
int right = 128;
|
||||
|
||||
void setup() {
|
||||
Heltec.begin(true /*DisplayEnable Enable*/, false /*LoRa Disable*/, false /*Serial Enable*/);
|
||||
@ -22,11 +24,11 @@ void setup() {
|
||||
delay(4000);
|
||||
}
|
||||
|
||||
void printError(String err){
|
||||
Heltec.display->clear();
|
||||
Heltec.display->setTextAlignment(TEXT_ALIGN_LEFT);
|
||||
Heltec.display->drawString(0, second_row, err );
|
||||
Heltec.display->display();
|
||||
void printError(String err) {
|
||||
Heltec.display->clear();
|
||||
Heltec.display->setTextAlignment(TEXT_ALIGN_LEFT);
|
||||
Heltec.display->drawString(left, second_row, err );
|
||||
Heltec.display->display();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
@ -66,14 +68,14 @@ void loop() {
|
||||
Heltec.display->clear();
|
||||
// print left column
|
||||
Heltec.display->setTextAlignment(TEXT_ALIGN_LEFT);
|
||||
Heltec.display->drawString(0, first_row, band );
|
||||
Heltec.display->drawString(0, second_row, power );
|
||||
Heltec.display->drawString(0, third_row, voltage );
|
||||
Heltec.display->drawString(left, first_row, band );
|
||||
Heltec.display->drawString(left, second_row, power );
|
||||
Heltec.display->drawString(left, third_row, voltage );
|
||||
// print right column
|
||||
Heltec.display->setTextAlignment(TEXT_ALIGN_RIGHT);
|
||||
Heltec.display->drawString(128, first_row, swr );
|
||||
Heltec.display->drawString(128, second_row, ptt );
|
||||
Heltec.display->drawString(128, third_row, temp );
|
||||
Heltec.display->drawString(right, first_row, swr );
|
||||
Heltec.display->drawString(right, second_row, ptt );
|
||||
Heltec.display->drawString(right, third_row, temp );
|
||||
Heltec.display->display();
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user