Skip to content

Commit

Permalink
Fix <UnitTest/ScreenRotation> coordinate residue
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Dec 24, 2020
1 parent 30a4089 commit 30d6ef3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@
## (14.12.2020)
- Fix the problem that cannot be compiled in SimpleFramework

## (24.12.2020)
- Fix <UnitTest/ScreenRotation> coordinate residue

3 changes: 3 additions & 0 deletions examples/UnitTest/ScreenRotation/ScreenRotation.ino
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ bool irq = false;

void setup()
{
Serial.begin(115200);
ttgo = TTGOClass::getWatch();
ttgo->begin();
ttgo->openBL();
Expand Down Expand Up @@ -49,12 +50,14 @@ void loop()
ttgo->power->clearIRQ();
}
if (ttgo->getTouch(x, y)) {
ttgo->tft->fillRect(120, 130, 100, 40, TFT_BLACK);
ttgo->tft->setCursor(120, 130);
ttgo->tft->print("X:");
ttgo->tft->println(x);
ttgo->tft->setCursor(120, ttgo->tft->getCursorY());
ttgo->tft->print("Y:");
ttgo->tft->print(y);
Serial.printf("x:%d y:%d\n", x, y);
}


Expand Down

0 comments on commit 30d6ef3

Please sign in to comment.