-
-
Notifications
You must be signed in to change notification settings - Fork 117
XPT2046 Driver and Example #1406
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
base: develop
Are you sure you want to change the base?
Conversation
Readme and versioning Example code copied from FT6xx6x driver
@Workshopshed I've fixed the checklist for you. |
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughTwo new files were added under the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
@dotnet-policy-service agree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (13)
README.md
is excluded by!**/*.md
and included by nonedevices/XPT2046/Point.cs
is excluded by none and included by nonedevices/XPT2046/Properties/AssemblyInfo.cs
is excluded by none and included by nonedevices/XPT2046/README.md
is excluded by!**/*.md
and included by nonedevices/XPT2046/TouchDemo/Program.cs
is excluded by none and included by nonedevices/XPT2046/TouchDemo/TouchDemo.nfproj
is excluded by none and included by nonedevices/XPT2046/TouchDemo/TouchDemo.sln
is excluded by none and included by nonedevices/XPT2046/TouchDemo/packages.config
is excluded by none and included by nonedevices/XPT2046/XPT2046.cs
is excluded by none and included by nonedevices/XPT2046/XPT2046.nfproj
is excluded by none and included by nonedevices/XPT2046/XPT2046.nuspec
is excluded by none and included by nonedevices/XPT2046/XPT2046.sln
is excluded by none and included by nonedevices/XPT2046/packages.config
is excluded by none and included by none
📒 Files selected for processing (2)
devices/XPT2046/category.txt
(1 hunks)devices/XPT2046/version.json
(1 hunks)
🔇 Additional comments (1)
devices/XPT2046/category.txt (1)
1-3
: Re-evaluate the “proximity” classificationThe XPT2046 is strictly a resistive-touch controller; it does not provide proximity-sensing capabilities. Keeping an incorrect category may confuse consumers of the metadata and mis-categorise NuGet search results.
-proximity touch +touchPlease confirm with the repo’s category taxonomy and drop the inaccurate entry (or justify its presence).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a quick review to start as once those adjusted, it will be faster for the rest. Thank you!
|
||
namespace TouchDemo | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please look at the how to add the linter in the project, it will point you on couple of things to adjust in the project. See: https://github.com/nanoframework/nanoFramework.IoT.Device/blob/develop/StyleCop/README.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't seem to work as expected. But manually copied the tags into the project and the style file into the folder. And that got me all the usual recommendations. Full stops, spaces etc
<FileAlignment>512</FileAlignment> | ||
<RootNamespace>TouchDemo</RootNamespace> | ||
<AssemblyName>TouchDemo</AssemblyName> | ||
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see the other projects and add all the signing elements as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already got:
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>..\key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup>
<DelaySign>false</DelaySign>
</PropertyGroup>
Is there some kind of build step too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For signing the assembly? Nope. Apart from the above, you have to add the key file.
We're using this pattern everywhere. You can take a look at pretty much every IoT binding project or library and you'll find it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just referenced the same key as the other projects.
Does the github configuration do the signing/publishing to Nuget or is the developer responsible?
Added StyleCop to the project and followed recommendations. Changed PowerMode constants to binary to be consistent with other constants.
Bumped version to 1
All the packaging and publishing is handled by the pipeline. This has to be signed before distribution. Plus only authorized accounts can publish nugets for the nanoFramework org. |
azp /run |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
One warning from the build, guessing it doesn't apply to this specific build? The windows-latest label will migrate from Windows Server 2022 to Windows Server 2025 beginning September 2, 2025. For more information see actions/runner-images#12677 |
Description
A driver for interacting with the XPT2046 resistive touch screen.
Motivation and Context
The SPI protocol used by this driver is quite complex and typical developers just want the X and Y values of the touch.
Created by referring to the datasheet and drivers in other languages.
Based the API on other touch controllers already in the repo such as the CHSC6540 and Ft6xx6x
How Has This Been Tested?
Ran this on an ESP32 based board which has a touch screen built in. Ensured that different touches produced outputs that were proportional to the position.
Screenshots
Types of changes
Checklist:
Summary by CodeRabbit