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

drivers/stmpe811: introduce conversion for X and Y coordinates #19883

Merged
merged 1 commit into from
Sep 2, 2023

Conversation

gschorcht
Copy link
Contributor

Contribution description

To obtain coordinates from the touch panel that correspond to the display coordinates, it is often necessary to convert the coordinates by swapping and mirroring. Instead of hard coding this conversion, it is now controlled by an additional conversion parameter. For the sake of simplicity, possible rotations are predefined.

The PR fixes tests/pkg/lgvl_touch for the stm32f429i-disc1 board where the coordinates from the touch panel seem to be mirrored in relation to the screen coordinates at the vertical axis.

Testing procedure

Flash tests/pkg/lvgl_touch. Without this PR the coordinates of the button don't correspond to the touch panel coordinates once the button has been pressed. Instead they seem to be mirrored at the vertical axis. With this PR, the coordinates should be correct.

Issues/PRs references

@github-actions github-actions bot added the Area: drivers Area: Device drivers label Aug 14, 2023
@gschorcht gschorcht added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Aug 14, 2023
@gschorcht gschorcht requested a review from aabadie August 14, 2023 11:03
@riot-ci
Copy link

riot-ci commented Aug 14, 2023

Murdock results

✔️ PASSED

ebe51e7 drivers/stmpe811: introduce coordinate conversion

Success Failures Total Runtime
7955 0 7955 14m:57s

Artifacts

@gschorcht gschorcht force-pushed the drivers/stmpe811_rotation_option branch from e239116 to 353b815 Compare August 14, 2023 11:21
@github-actions github-actions bot added the Area: tools Area: Supplementary tools label Aug 14, 2023
@gschorcht gschorcht added the State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet label Aug 14, 2023
@gschorcht gschorcht force-pushed the drivers/stmpe811_rotation_option branch from 353b815 to 3d2229b Compare August 14, 2023 13:17
@gschorcht gschorcht removed the State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet label Aug 14, 2023
@gschorcht gschorcht force-pushed the drivers/stmpe811_rotation_option branch from 3d2229b to 98c8ee7 Compare August 14, 2023 13:25
@gschorcht gschorcht changed the title drivers/stmpe811: introduce coordinate conversion drivers/stmpe811: introduce conversion for X and Y coordinates Aug 15, 2023
@aabadie
Copy link
Contributor

aabadie commented Sep 2, 2023

Looks good but needs a rebase

To obtain coordinates from the touch panel that correspond to the display coordinates, it is often necessary to convert the coordinates from the touch display by swapping and mirroring. For the sake of simplicity, possible rotations are additionally defined.
@gschorcht gschorcht force-pushed the drivers/stmpe811_rotation_option branch from 98c8ee7 to ebe51e7 Compare September 2, 2023 15:02
@gschorcht
Copy link
Contributor Author

Looks good but needs a rebase

Done.

@aabadie
Copy link
Contributor

aabadie commented Sep 2, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented Sep 2, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 51a39d0 into RIOT-OS:master Sep 2, 2023
@gschorcht gschorcht deleted the drivers/stmpe811_rotation_option branch September 3, 2023 00:52
@gschorcht
Copy link
Contributor Author

@aabadie Many thanks for reviewing.

@MrKevinWeiss MrKevinWeiss added this to the Release 2023.10 milestone Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants