diff --git a/fossa/105_display.ino b/fossa/105_display.ino index 5c3bf31..12e61d0 100644 --- a/fossa/105_display.ino +++ b/fossa/105_display.ino @@ -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); } @@ -68,4 +68,4 @@ void qrShowCodeLNURL(String message) { int textWidth(String text, int textSize) { tft.setTextSize(textSize); return tft.textWidth(text); -} \ No newline at end of file +}