@@ -72,7 +72,7 @@ def __init__(
72
72
):
73
73
self ._i2c = I2CDevice (i2c , address )
74
74
self ._debug = debug
75
- self .irq_pin = irq_pin
75
+ self ._irq_pin = irq_pin
76
76
77
77
chip_data = self ._read (_FT6XXX_REG_LIBH , 8 ) # don't wait for IRQ
78
78
lib_ver , chip_id , _ , _ , firm_id , _ , vend_id = struct .unpack (
@@ -96,7 +96,7 @@ def __init__(
96
96
@property
97
97
def touched (self ):
98
98
""" Returns the number of touches currently detected """
99
- return self ._read (_FT6XXX_REG_NUMTOUCHES , 1 , irq_pin = self .irq_pin )[0 ]
99
+ return self ._read (_FT6XXX_REG_NUMTOUCHES , 1 , irq_pin = self ._irq_pin )[0 ]
100
100
101
101
# pylint: disable=unused-variable
102
102
@property
@@ -106,7 +106,7 @@ def touches(self):
106
106
touch coordinates, and 'id' as the touch # for multitouch tracking
107
107
"""
108
108
touchpoints = []
109
- data = self ._read (_FT6XXX_REG_DATA , 32 , irq_pin = self .irq_pin )
109
+ data = self ._read (_FT6XXX_REG_DATA , 32 , irq_pin = self ._irq_pin )
110
110
111
111
for i in range (2 ):
112
112
point_data = data [i * 6 + 3 : i * 6 + 9 ]
@@ -129,7 +129,7 @@ def _read(self, register, length, irq_pin=None):
129
129
with self ._i2c as i2c :
130
130
131
131
if irq_pin is not None :
132
- while self .irq_pin .value :
132
+ while self ._irq_pin .value :
133
133
pass
134
134
135
135
i2c .write (bytes ([register & 0xFF ]))
0 commit comments