Skip to content

Commit

Permalink
Tdeck Tx displayShow fix
Browse files Browse the repository at this point in the history
  • Loading branch information
richonguzman committed Dec 19, 2024
1 parent 63f2175 commit da2abf0
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,30 @@ void displayToggle(bool toggle) {
void displayShow(const String& header, const String& line1, const String& line2, int wait) {
#ifdef HAS_TFT
#if defined(TTGO_T_DECK_PLUS) || defined(TTGO_T_DECK_GPS)
draw_T_DECK_Top();//header, line1, line2);
draw_T_DECK_Top();
String tftLine1, tftLine2, tftLine3, tftLine4;
if (line1.length() > 22 && line2.length() > 22) {
tftLine1 = line1.substring(0,22);
tftLine2 = line1.substring(22);
tftLine3 = line2.substring(0,22);
tftLine4 = line2.substring(22);
} else if (line1.length() > 22) {
tftLine1 = line1.substring(0,22);
tftLine2 = line1.substring(22);
tftLine3 = line2;
tftLine4 = "";
} else if (line2.length() > 22) {
tftLine1 = line1;
tftLine2 = line2.substring(0,22);
tftLine3 = line2.substring(22);
tftLine4 = "";
} else {
tftLine1 = line1;
tftLine2 = line2;
tftLine3 = "";
tftLine4 = "";
}
draw_T_DECK_Body(header, tftLine1, tftLine2, tftLine3, tftLine4, "");
#endif
#if defined(HELTEC_WIRELESS_TRACKER)
sprite.fillSprite(TFT_BLACK);
Expand Down

0 comments on commit da2abf0

Please sign in to comment.