-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for CST816S touch interface #20213
Add support for CST816S touch interface #20213
Conversation
OMG! Did you use a source code formatter? The current format breaks all silent Tasmota conventions. Pls undo the formatting. Just add your code changes for us to review. |
Yes I did 🙈 - Sorry for that - that's why I only submitted as Draft. Is there a list of formatting rules I can feed into vscode? |
No there isn't. But I prefer to use brackets like:
instead of
Same for functions and every situation brackets are needed. |
The code fails on ESP8266. Considering the amount of code overlap between the library and xdrv_55_touch.ino I suggest to skip the library and add the needed functions into xdrv_55_touch.ino. Then also test for ESP8266 before re-submitting PR. |
Thank you for your comments - before starting I just want to clarify: You suggest moving the i2c communication and ISR handling into the xdrv_55_touch.ino? |
Yes. Looking at the library I think most of the code is already available in Tasmota. Have a look at Tasmota's I2C support functions in |
Thank you for the hints. I have reduced the changes and checked compilation on esp8266. Tested |
* Add initial version (prints coordinates) * Add CST816S_found * Revert formatting * Add supported gestures (untested) * Correct use of enums * Remove library dependency * Unification of methods * Remove redundant variables and format
Description:
This PR adds the driver for CST816S found in cheap, smartwatch like ESP32C3 "2424S012" boards (Aliexress Search Link). Touch works and gesture recognition works.
Functionality is tested with the named model in
[env:tasmota32c3]
with-DFIRMWARE_LVGL
and-DUSE_CST816S
.Code compiles for
[env:tasmota-display]
with-DUSE_CST816S
and runs, but is untested for functionality on esp8266.I have attached a .autoconf to upload and test - remove the ".zip" extension before (only added due to Github's limitations). A remap
:M,240,0,240,0
is still necessary in the display.ini.Related issue (if applicable): based on discussion #19487
Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass
ESP32C3-2424S012.autoconf.zip