|
Post by craigb on Feb 27, 2015 11:05:04 GMT -8
Anybody know if there is a way to save the touchscreen orientation when rotating the screen?
I have, so far, successfully rotated the screen 180 deg. with the GD.wr(REG_ROTATE, 1); command, and then running GD.cmd_calibrate(); But, I am trying to write a standalone interface application and I don't want the calibration routine to run every time I boot up.
Thanks,
|
|
Pix-OS
Junior Member
Posts: 11
|
Post by Pix-OS on Feb 28, 2015 13:20:03 GMT -8
you could use the EEPROM for that and load the values in on startup of your application
|
|
|
Post by jamesbowman on Feb 28, 2015 19:00:31 GMT -8
Currently this isn't as easy as it could be using the GD library.
Here is one solution: rotate the screen, do a recalibration, then write the values back to EEPROM so the GD2 library just uses them each time it starts. Something like:
GD.self_calibrate(); for (int i = 0; i < 24; i++) EEPROM.write(1 + i, GDTR.rd(REG_TOUCH_TRANSFORM_A + i));
|
|