Skip to content

Commit

Permalink
First upload fix and clockfaces new line char fix (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
gamba69 authored Sep 6, 2024
1 parent 5e0870b commit 721010c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions EleksTubeHAX_pio/src/TFTs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ void TFTs::loadClockFacesNames() {
}
while(f.available() && i<9) {
patterns_str[i] = f.readStringUntil('\n');
patterns_str[i].replace(String(char(13)), "");
Serial.println(patterns_str[i]);
i++;
}
Expand Down
4 changes: 4 additions & 0 deletions EleksTubeHAX_pio/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ void setup() {
uclock.setActiveGraphicIdx(tfts.NumberOfClockFaces);
Serial.println("Last selected index of clock face is larger than currently available number of image sets.");
}
if (uclock.getActiveGraphicIdx() < 1) {
uclock.setActiveGraphicIdx(1);
Serial.println("Last selected index of clock face is less than 1.");
}
tfts.current_graphic = uclock.getActiveGraphicIdx();

tfts.println("Done with setup.");
Expand Down

0 comments on commit 721010c

Please sign in to comment.