inmarket Posted February 23, 2015 Report Share Posted February 23, 2015 The STMPE811 driver has had its self-calibration capability updated to work correctly on orientations other than GDISP_ROTATE_0 Link to comment Share on other sites More sharing options...
Dvor_nik Posted February 24, 2015 Report Share Posted February 24, 2015 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 Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted February 24, 2015 Report Share Posted February 24, 2015 Hi Dvor_nik,Inmarket does not have this board himself. I can try it tonight if you tell me what I should do. I have never tested the self calibration before.~ Tectu Link to comment Share on other sites More sharing options...
Dvor_nik Posted February 24, 2015 Report Share Posted February 24, 2015 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 #endifJust lost break; operator I guest. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted February 24, 2015 Report Share Posted February 24, 2015 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 More sharing options...
inmarket Posted February 24, 2015 Author Report Share Posted February 24, 2015 I can see the problem. I will fix it today.like you said, I missed a break.Sorry. Link to comment Share on other sites More sharing options...
inmarket Posted February 25, 2015 Author Report Share Posted February 25, 2015 Now fixed. Link to comment Share on other sites More sharing options...
Dvor_nik Posted February 25, 2015 Report Share Posted February 25, 2015 inmarket Thanks for bug fixing!To Tectu (for future testing):1. Add #define GMOUSE_STMPE811_SELF_CALIBRATE TRUEto gfxconf.h2. Run some demo what contains button (the best is "button" demo for testing it in different orientation).3. Touch the button. Link to comment Share on other sites More sharing options...
Dvor_nik Posted February 25, 2015 Report Share Posted February 25, 2015 ../../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 More sharing options...
inmarket Posted February 25, 2015 Author Report Share Posted February 25, 2015 That warning can be ignored. I will fix the warning today but it is nothing to worry about and should not affect the operation of the code. Link to comment Share on other sites More sharing options...
inmarket Posted February 28, 2015 Author Report Share Posted February 28, 2015 These warnings have now been fixed.The FT5x06 driver and STMPE610 driver have now also been updated with the self-calibration fixes. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now