Closed OperatorB closed 1 year ago
I have finally found a way to eliminate this issue but it might not be the best way. This modification might screw up other type of touch enabled displays so anyone with better arithmetic and programming skills should take a more professional look for a long term fix.
What I did: edit 'GT911.h' From int32_t begin(TwoWire use_wire, int8_t pin_int, int8_t pin_res, uint16_t xs, uint16_t ys); To int32_t begin(TwoWire use_wire, int8_t pin_int, int8_t pin_res, uint16_t ys, uint16_t xs);
Any other tests or whatever needs to be done to verify certain things please let me know. Thank you!
@gemu2015 You know this stuff best. Correct fix?
i am currently traveling will check this next week
i don't know exactly what is wrong with your setup. but i assume case 2
flipping x and y is already supported via bit 7 of touch rotation opcode. like this :0,28,00,00,81 :1,88,00,00,82 :2,E8,00,00,83 :3,48,00,00,80
and set the desired rotation by console cmd
Understood. Thank you for your input!
I have restored the source code recompiled, loaded etc. and switched X and Y in the display.ini. The result was that the touch positions were correct however now the display is messed up(cropped).
I realized that I have also changed one more thing back then in the GT911.h file that was: From
To
Good luck!
Tasmota project is very cool! Thanks!
Dear @OperatorB kindly ask if you can provide your diplay.ini and autoexec.be? I´m a absolute beginner in this and just flashed Tasmota lgvl to my ESP32-3248S035C (capacitive touch) and by reusing your files my screen works (on/off) but cannot use/test the touch button on it you created. Gues you fixed this finally and kindly ask to share. Big Thx!!!
PROBLEM DESCRIPTION
A clear and concise description of what the problem is.
ESP32-3248S035C panel with ST7796 capacitive touch display does seem to have a touchscreen offset compared to the displayed object (e.g. button). Tried to rotate touchscreen with the third parameter of ':0' option of 'display.ini' but detection is always off. So, whenever display coordinate x=0 y=0 is the same as the TSGlobal.touched x=0 y=0 then either the X Y is swapped and/or inverted.
UPDATE_1: I have spent some more time and realized that the raw X Y max values are swapped compared to the display. So, the longer axis only goes up to 360 but the shorter axis goes up to 480. I now try to find where to swap the mapping in source code, any help is appreciated.
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:Template: {"NAME":"mako1","GPIO":[0,1,800,6210,320,1,1,1,672,704,736,768,321,322,1,1,0,0,1,1,0,1,1,992,0,0,0,0,1,1,1,1,1,0,1,1],"FLAG":0,"BASE":1}
Module: {"Module":{"0":"mako1"}}
GPIO 255: {"GPIO0":{"0":"None"},"GPIO1":{"0":"None"},"GPIO2":{"800":"SPI DC1"},"GPIO3":{"6210":"Option A3"},"GPIO4":{"320":"Led_i1"},"GPIO5":{"0":"None"},"GPIO6":{"0":"None"},"GPIO7":{"0":"None"},"GPIO8":{"0":"None"},"GPIO9":{"0":"None"},"GPIO10":{"0":"None"},"GPIO11":{"0":"None"},"GPIO12":{"672":"SPI MISO1"},"GPIO13":{"704":"SPI MOSI1"},"GPIO14":{"736":"SPI CLK1"},"GPIO15":{"768":"SPI CS1"},"GPIO16":{"321":"Led_i2"},"GPIO17":{"322":"Led_i3"},"GPIO18":{"0":"None"},"GPIO19":{"0":"None"},"GPIO20":{"0":"None"},"GPIO21":{"0":"None"},"GPIO22":{"0":"None"},"GPIO23":{"0":"None"},"GPIO24":{"0":"None"},"GPIO25":{"0":"None"},"GPIO26":{"0":"None"},"GPIO27":{"992":"Backlight"},"GPIO32":{"0":"None"},"GPIO33":{"0":"None"},"GPIO34":{"0":"None"},"GPIO35":{"0":"None"},"GPIO36":{"0":"None"},"GPIO37":{"0":"None"},"GPIO38":{"0":"None"},"GPIO39":{"0":"None"}}
Status 0
:19:48:36.430 CMD: status 0 19:48:36.433 RSL: STATUS = {"Status":{"Module":0,"DeviceName":"Tasmota","FriendlyName":["Tasmota"],"Topic":"tasmota_44B724","ButtonTopic":"0","Power":1,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0,"InfoRetain":0,"StateRetain":0,"StatusRetain":0}} 19:48:36.467 RSL: STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://ota.tasmota.com/tasmota32/release/tasmota32-lvgl.bin","RestartReason":"Vbat power on reset","Uptime":"0T00:07:34","StartupUTC":"2023-06-15T18:41:02","Sleep":50,"CfgHolder":4617,"BootCount":4,"BCResetTime":"2023-06-15T19:39:03","SaveCount":13}} 19:48:36.502 RSL: STATUS2 = {"StatusFWR":{"Version":"12.5.0(lvgl-haspmota)","BuildDateTime":"2023-06-15T20:30:34","Core":"2_0_7","SDK":"4.4.4.20230310","CpuFrequency":240,"Hardware":"ESP32-D0WD-V3 rev.3","CR":"392/699"}} 19:48:36.515 RSL: STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["Monero",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00008001","2805C80001000600003C5A0A192800000000","00000080","00006000","00004000","00000000"]}} 19:48:36.553 RSL: STATUS4 = {"StatusMEM":{"ProgramSize":1886,"Free":993,"Heap":103,"StackLowMark":19,"PsrMax":0,"PsrFree":0,"ProgramFlashSize":4096,"FlashSize":4096,"FlashChipId":"1640EF","FlashFrequency":40,"FlashMode":"DIO","Features":["00000809","0FA287CE","00048001","000007C7","01000000","40000881","40004080","00200000","5400001D","000200A0"],"Drivers":"1,2,3,4,5,8,9,10,12,13,16,20,24,29,38,50,52,54,55,56,62,67,82,88","Sensors":"1,2,3,5,6,7,8,9,85,127","I2CDriver":"7,8,9,10,58,59,77"}} 19:48:36.602 RSL: STATUS5 = {"StatusNET":{"Hostname":"tasmota-44B724-5924","IPAddress":"192.168.2.118","Gateway":"192.168.2.111","Subnetmask":"255.255.255.0","DNSServer1":"9.9.9.9","DNSServer2":"8.8.8.8","Mac":"54:43:B2:44:B7:24","IP6Global":"","IP6Local":"fe80::5643:b2ff:fe44:b724","Ethernet":{"Hostname":"","IPAddress":"0.0.0.0","Gateway":"0.0.0.0","Subnetmask":"0.0.0.0","DNSServer1":"9.9.9.9","DNSServer2":"8.8.8.8","Mac":"00:00:00:00:00:00","IP6Global":"","IP6Local":""},"Webserver":2,"HTTP_API":1,"WifiConfig":4,"WifiPower":17.0}} 19:48:36.651 RSL: STATUS7 = {"StatusTIM":{"UTC":"2023-06-15T18:48:36","Local":"2023-06-15T19:48:36","StartDST":"2023-03-26T02:00:00","EndDST":"2023-10-29T03:00:00","Timezone":"+01:00","Sunrise":"04:46","Sunset":"20:54"}} 19:48:36.668 RSL: STATUS10 = {"StatusSNS":{"Time":"2023-06-15T19:48:36"}} 19:48:36.675 RSL: STATUS11 = {"StatusSTS":{"Time":"2023-06-15T19:48:36","Uptime":"0T00:07:34","UptimeSec":454,"Heap":101,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":99,"MqttCount":0,"Berry":{"HeapUsed":5,"Objects":68},"POWER":"ON","Wifi":{"AP":1,"SSId":"SecretSSID","BSSId":"C0:C9:E3:51:32:86","Channel":4,"Mode":"11n","RSSI":70,"Signal":-65,"LinkCount":1,"Downtime":"0T00:00:03"}}}
TO REPRODUCE
Steps to reproduce the behavior:
Build firmware with PlatformIO from tasmota-master branch. Change only 'platformio_override.ini' select 'tasmota32-lvgl' from 'default_envs'. Erase_flash then write_flash. (esptool.py --port com11 write_flash -fs 4MB -fm dout 0x0 firmware.factory.bin) Configure device with template then upload 'display.ini' (see below) then upload 'autoexec.be' (see below) to the file system.
EXPECTED BEHAVIOUR
A clear and concise description of what you expected to happen.
Button should react to touch where the button is visible not outside with an offset.
SCREENSHOTS
If applicable, add screenshots to help explain your problem.
n/a
ADDITIONAL CONTEXT
Add any other context about the problem here.
display.ini:
autoexec.be:
(Please, remember to close the issue when the problem has been addressed)