Jump to content

[Bug Fix] STMPE811 Touch driver Self calibration


inmarket

Recommended Posts

Hi! Understand.

Before this commit self calibration works fine on this board (yea, only in default orientation :) I forgot to report about it).

	#if GMOUSE_STMPE811_SELF_CALIBRATE
#if GDISP_NEED_CONTROL
switch(gdispGGetOrientation(m->display)) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
pdr->x = gdispGGetWidth(m->display) - pdr->x / (4096/gdispGGetWidth(m->display));
pdr->y = pdr->y / (4096/gdispGGetHeight(m->display));
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
pdr->x = gdispGGetHeight(m->display) - pdr->x / (4096/gdispGGetHeight(m->display));
pdr->y = pdr->y / (4096/gdispGGetWidth(m->display));
}
#else
pdr->x = gdispGGetWidth(m->display) - pdr->x / (4096/gdispGGetWidth(m->display));
pdr->y = pdr->y / (4096/gdispGGetHeight(m->display));
#endif
#endif

Just lost break; operator I guest.

Link to comment
Share on other sites

Can you please tell me how I can reproduce the problem? This would save a lot of time and help to track down and fix the problem more quickly.

What exactly needs to be done before that commit to show that self calibration works and what needs to be done after that commit to show that it doesn't work?

I will test as soon as I am at home.

~ Tectu

Link to comment
Share on other sites

../../chibios/ext/ugfx/drivers/ginput/touch/STMPE811/gmouse_lld_STMPE811.c: In function 'read_xyz':
../../chibios/ext/ugfx/drivers/ginput/touch/STMPE811/gmouse_lld_STMPE811.c:212:4: warning: enumeration value 'GDISP_ROTATE_PORTRAIT' not handled in switch [-Wswitch]
../../chibios/ext/ugfx/drivers/ginput/touch/STMPE811/gmouse_lld_STMPE811.c:212:4: warning: enumeration value 'GDISP_ROTATE_LANDSCAPE' not handled in switch [-Wswitch]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...