diff --git a/xpt2046.py b/xpt2046.py index 4f9a1d5..78fbd09 100644 --- a/xpt2046.py +++ b/xpt2046.py @@ -18,7 +18,7 @@ class Touch(object): def __init__(self, spi, cs, int_pin=None, int_handler=None, width=240, height=320, - x_min=100, x_max=1962, y_min=100, y_max=1900): + x_min=100, x_max=3924, y_min=100, y_max=3800): """Initialize touch screen controller. Args: @@ -133,4 +133,4 @@ def send_command(self, command): self.spi.write_readinto(self.tx_buf, self.rx_buf) self.cs(1) - return (self.rx_buf[1] << 4) | (self.rx_buf[2] >> 4) + return (self.rx_buf[1] << 5) | (self.rx_buf[2] >> 3)