Commit Graph

15 Commits

Author SHA1 Message Date
Bodmer
df96536152
Update Touch.cpp 2023-03-03 07:26:21 +13:00
Bodmer
2b576dc614
Fix #2018 2022-09-14 12:07:39 +01:00
Bodmer
5f171eeefd
Fix #923 and #915 2021-01-08 23:53:28 +00:00
Bodmer
8209c00316 Add new alphaBlend functions
Added 24 bit colour handling alphaBlend to reduce precision loss in multiple blend stages (e.g. in 2D colour gradients). Added option for alpha dither to reduce colour banding in gradients with 16 bit colours.

Get rid of compile warnings.
2020-01-30 16:01:36 +00:00
Bodmer
0e0fd75277 Raise to version 2.0.0
The library has been cleaned up as it has got a bit untidy due to the large number of small incremental changes.

4bit Sprite examples renaed to be consistent with others.

alphaBlend example moved to generic folder (alphaBlend fn was moved to TFT_eSPI class).
Added sections + explanatory comments to functions prototypes.

Temporary comments added for potential gotchas for noobs when using DMA.

spi_begin/end functions renamed to reflect functionality. Old fns  retained for backwards compatibility with user setup.h files.
2020-01-26 21:17:49 +00:00
Calvin Hass
a627c51118
Fix getTouch() return status upon bounds overflow
- When the post-remapped coordinates exceed screen bounds, `getTouch()` was returning a "valid" status without updating the coordinates. This would result in spurious touch detection events at the screen boundaries.
- The fix ensures that the return value is set to "invalid" in this boundary condition.
2019-05-21 07:13:19 -07:00
Bodmer
26d7e4038a Fix touch screen handler
The touch screen handler was broken for the ESP8266 only. The library
uses SPI write only configuration for ESP8266 so the SPI buffer can be
recycled and it was left in write only mode. The library now switches
back to read & write mode at the end of a transaction.
2019-02-14 00:32:16 +00:00
Bodmer
054a824eb8 Add ESP32 VSPI or HSPI port option + others
If the VSPI port is in use and pins are not accessible (e.g. TTGO
T-Beam)
then add or uncomment the following line in the setup header file:
//#define USE_HSPI_PORT

Minor performance tweaks for ESP32 to minimise the occurence of the slow
transaction overhead.

setAddrWindow now takes xstart, ystart, width and height as inputs

Multi-sample raw touch x and y for noisy displays

Example update for setAddrWindow change compatibility
2019-01-22 18:41:31 +00:00
Bodmer
e8c201db5e Update touch handler
Added new function that sketch can call to convert raw ADC x and y
values to calibrated screen coordinates:
tft.convertRawXY(&x, &y);

Redunced required number of SPI transfers needed to read raw values.
Changed mode so PENIRQ pin is enabled so users sketch can read this
signal (if needed).

See issue #279.
2019-01-01 23:56:08 +00:00
Bodmer
1cf2305e4d Add capability to read TFT SDA bi-directional pin
Tested on an ESP32 with ST7789V display
SDA read is very slow on an ESP8266 (to be investigated)
Added new setup #define TFT_SDA_READ
Add new ESP32 and ESP8266 compatible in example/Generic folder to test
capture of TFT screen
2018-11-23 03:09:07 +00:00
Bodmer
a9c4351c64 Allow more settle time for raw values read from touch controller 2018-08-26 23:17:58 +01:00
Bodmer
f56184e9cd Add diagnostic sketches
Do not load button class is touch screen chip select not defined
2018-04-11 01:03:26 +01:00
Bodmer
aa81a4eab8 Correct issue #115 2018-04-06 22:44:31 +01:00
Bodmer
d5f0812bbb Fix touch issue #114
Also had to mirror the coordinate transform.
2018-04-01 16:37:53 +01:00
Bodmer
8752236ac2 Add smooth (antialiased) fonts 2018-02-24 19:02:20 +00:00