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

Fix API parameter types for readData() #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ImpulseAdventure
Copy link

@ImpulseAdventure ImpulseAdventure commented Sep 21, 2019

The existing readData() API has mismatched integer type widths, preventing the user from using the API to query the raw z (pressure) value.

This simple fix adjusts the API parameters to match the returned data types.

Existing API:

void XPT2046_Touchscreen::readData(uint16_t *x, uint16_t *y, uint8_t *z)
{
	update();
	*x = xraw;
	*y = yraw;
	*z = zraw;
}

Raw value declarations:

private:
	int16_t xraw=0, yraw=0, zraw=0;

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant