Skip to content

Commit fc066cc

Browse files
author
dave
committed
#104 fix touch integration with renderer, #103 nearly all examples now recompiled with 2.1
1 parent 42fce39 commit fc066cc

18 files changed

+1087
-971
lines changed

examples/colorTftEthernet32/colorTftEthernet.emf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@
339339
"lastDisplayUuid": "4dcb12ec-13d8-4466-b8b6-bd575eae4612",
340340
"lastInputUuid": "6dd87e7d-e751-4912-a70d-91793b1d3d87",
341341
"lastRemoteUuid": "0877131c-e03e-426b-8eaf-228e01f5e7f1",
342-
"lastThemeUuid": "03c6b25f-db63-402a-8447-a5ce1484c14d",
342+
"lastThemeUuid": "e4524028-edd8-4e0a-ae15-a1f2ba05354f",
343343
"applicationUUID": "22813e5e-88b1-42d5-9601-4831b2be369b",
344344
"applicationName": "Ada32 Ethernet",
345345
"lastProperties": [
@@ -465,7 +465,7 @@
465465
},
466466
{
467467
"name": "TITLE_SHOW_MODE",
468-
"latestValue": "TITLE_FIRST_ROW",
468+
"latestValue": "TITLE_ALWAYS",
469469
"subsystem": "THEME"
470470
},
471471
{

examples/esp32Amplifier/TouchCalibrator.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ class TouchScreenCalibrator : public CustomDrawing {
2222
MenuTouchScreenManager* touchScreen;
2323
int oldX= 0, oldY=0;
2424
unsigned int takeOverCount=0;
25-
iotouch::TouchInterrogator::TouchRotation oldRotation = iotouch::TouchInterrogator::PORTRAIT;
26-
uint8_t oldTftRotation = 0;
2725
public:
2826
explicit TouchScreenCalibrator(MenuTouchScreenManager *touchScreen)
2927
: drawable(nullptr), touchScreen(touchScreen) {}
@@ -36,9 +34,6 @@ class TouchScreenCalibrator : public CustomDrawing {
3634
if(renderer.getRendererType() != RENDER_TYPE_CONFIGURABLE) {
3735
renderer.giveBackDisplay(); // we cannot work with non configurable rendering
3836
}
39-
oldTftRotation = tft.getRotation();
40-
oldRotation = touchScreen->changeRotation(iotouch::TouchInterrogator::RAW);
41-
tft.setRotation(0);
4237
drawable = reinterpret_cast<GraphicsDeviceRenderer*>(currentRenderer)->getDeviceDrawable();
4338
drawable->startDraw();
4439
drawable->setDrawColor(TFT_BLACK);
@@ -48,6 +43,7 @@ class TouchScreenCalibrator : public CustomDrawing {
4843
}
4944

5045
void renderLoop(unsigned int currentValue, RenderPressMode userClick) override {
46+
5147
drawable->startDraw();
5248
drawable->setDrawColor(TFT_BLACK);
5349
drawable->drawCircle(Coord(oldX, oldY), 10, true);
@@ -73,8 +69,6 @@ class TouchScreenCalibrator : public CustomDrawing {
7369
drawable->drawCircle(Coord(oldX, oldY), 10, true);
7470

7571
if(oldX < 40 && oldY < 40 && touchScreen->getLastTouchState() == iotouch::HELD) {
76-
tft.setRotation(oldTftRotation);
77-
touchScreen->changeRotation(oldRotation);
7872
renderer.giveBackDisplay();
7973
}
8074
}

0 commit comments

Comments
 (0)