Added comments and cleanup

This commit is contained in:
sam
2024-03-08 14:25:24 +01:00
parent 77636f2a60
commit 60d86bc0d5
3 changed files with 11 additions and 32 deletions

View File

@@ -41,25 +41,3 @@ void loop() {
displayText.writeText(Answer[i], 3, 0, 200, 0, true, true);
delay(20000);
}
// void writeText(char* text, int size, int posX, int posY, int screenTime, bool center){
// //if true overwrites x
// if (center){
// posX = centerText(text);
// }
// tft.setCursor(posX, posY); // Set the cursor to the top left corner
// tft.setTextSize(size); // Set textsize
// tft.println(text);
// delay(screenTime);
// }
// int centerText(char* text) {
// int16_t x1, y1;
// uint16_t w, h;
// tft.getTextBounds(text, 0, 0, &x1, &y1, &w, &h); // Calculate the width of the text
// int x = (tft.width() - w) / 2; // Calculate the x-coordinate for the centered text
// return x;
// }