Gestures are slow perceiving, only detecting one of 5-10 tries

You need to set the offset x value in order to get it to write properly…

The display IC is made to work with a fixed resolution. So if a display that has a smaller resolution is connected then you are going to need to shift the image over in VRAM. Think of it this way…

Here is an image with what you display is outputting overlsayed on top of the buffer data for 240 x 320

image

When you decrease the buffer data size to 172 x 320 This is what happens.

image

The display IC is still expecting to have it’s buffer data of 240x320 filled but you are only providing data that is going to fill 172 x 320 and that data is being filled starting at position 0,0. the red rectangle denotes where the display is suitated in that buffer data.

This is the reason why what you are seeing is pushed over to the left.

All you need to do to correct this is in your flush function add 34 to the X axis if the rotation is 0° or 180° otherwise add it to the Y axis

2 Likes