Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions fossa/105_display.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@ void printMessage(String text1, String text2, String text3, int ftcolor, int bgc
tft.fillScreen(bgcolor);
tft.setTextColor(ftcolor, bgcolor);
tft.setTextSize(4);
tft.setCursor((480 - textWidth(text1, 4)) / 2, 40);
tft.setCursor((TFT_WIDTH - textWidth(text1, 4)) / 2, 40);
tft.println(text1);
tft.setCursor((480 - textWidth(text2, 4)) / 2, 120);
tft.setCursor((TFT_WIDTH - textWidth(text2, 4)) / 2, 120);
tft.println(text2);
tft.setTextSize(3);
tft.setCursor((480 - textWidth(text3, 3)) / 2, 200);
tft.setCursor((TFT_WIDTH - textWidth(text3, 3)) / 2, 200);
tft.println(text3);
}
void feedmefiat() {
tft.setTextColor(TFT_WHITE);
tft.setCursor((480 - textWidth(fossaT, 2)) / 2, 40);
tft.setCursor((TFT_WIDTH - textWidth(fossaT, 2)) / 2, 40);
tft.setTextSize(2);
tft.println(fossaT);
tft.setCursor((480 - textWidth(feedT + " " + String(charge) + chargeT, 2)) / 2, 280);
tft.setCursor((TFT_WIDTH - textWidth(feedT + " " + String(charge) + chargeT, 2)) / 2, 280);
tft.setTextSize(2);
tft.println(feedT + " " + String(charge) + chargeT);
}
void feedmefiatloop() {
tft.setTextColor(homeScreenColors[homeScreenNumColorCount]);
tft.setTextSize(8);
tft.setCursor((480 - textWidth(satsT, 8)) / 2, 80);
tft.setCursor((TFT_WIDTH - textWidth(satsT, 8)) / 2, 80);
tft.println(satsT);
tft.setCursor((480 - textWidth(forT, 8)) / 2, 140);
tft.setCursor((TFT_WIDTH - textWidth(forT, 8)) / 2, 140);
tft.println(forT);
tft.setCursor((480 - textWidth(fiatT, 8)) / 2, 200);
tft.setCursor((TFT_WIDTH - textWidth(fiatT, 8)) / 2, 200);
tft.println(fiatT);
delay(100);
}
Expand Down Expand Up @@ -68,4 +68,4 @@ void qrShowCodeLNURL(String message) {
int textWidth(String text, int textSize) {
tft.setTextSize(textSize);
return tft.textWidth(text);
}
}