Jump to content

Recommended Posts

Posted

Hi, inmarket.

Self calibration doesn't work now! For GDISP_ROTATE_0. No reaction on touch.

It was broken after "Fix to STMPE811 touch driver to fix self-calibration in other orientations" commit.

Hardware:

Embest-STM32-DMSTF4BB

Posted

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.

Posted

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

Posted

inmarket Thanks for bug fixing!

To Tectu (for future testing):

1. Add

#define GMOUSE_STMPE811_SELF_CALIBRATE               TRUE

to gfxconf.h

2. Run some demo what contains button (the best is "button" demo for testing it in different orientation).

3. Touch the button.

Posted
../../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]

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...