Skip to content
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

[Bug] Missing 1-Pixel Offset in Touch Coordinate Inversion (BSP-635) #506

Open
1 task done
katsusand opened this issue Feb 11, 2025 · 0 comments
Open
1 task done
Labels

Comments

@katsusand
Copy link

Board

ESP32 DevModule

Hardware Description

MSP2807 SPI LCD with touch controller
(ILI9341, XPT2046)

IDE Name

VSCode

Operating System

Ubuntu24

Description

In the file components/lcd_touch/esp_lcd_touch/esp_lcd_touch.c, there appears to be an issue with the inversion of touch coordinates. The current implementation does not account for a necessary 1-pixel offset, which may lead to a misalignment of the touch input.

This adjustment should correctly align the touch coordinates with the display by subtracting the extra pixel.

Please review the proposed changes.

Sketch

Affected code:
- **Line 90:**
  - Current: `x[i] = tp->config.x_max - x[i];`
  - Proposed: `x[i] = tp->config.x_max - x[i] - 1;`

- **Line 95:**
  - Current: `y[i] = tp->config.y_max - y[i];`
  - Proposed: `y[i] = tp->config.y_max - y[i] - 1;`

Other Steps to Reproduce

No response

I have checked existing issues, README.md and ESP32 Forum

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@katsusand katsusand added Status: Awaiting triage Type: Bug Something isn't working labels Feb 11, 2025
@github-actions github-actions bot changed the title [Bug] Missing 1-Pixel Offset in Touch Coordinate Inversion [Bug] Missing 1-Pixel Offset in Touch Coordinate Inversion (BSP-635) Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant