From 93d05ae2ce54051a557fa678245b5091963b71e1 Mon Sep 17 00:00:00 2001 From: Lado Kumsiashvili Date: Thu, 17 Oct 2019 23:58:07 +0200 Subject: [PATCH] fixed colVal scan to check the 4th column for 4x4 keypad --- matrix_keypad/RPi_GPIO.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix_keypad/RPi_GPIO.py b/matrix_keypad/RPi_GPIO.py index ad8400f..eec0ad2 100644 --- a/matrix_keypad/RPi_GPIO.py +++ b/matrix_keypad/RPi_GPIO.py @@ -72,7 +72,7 @@ def getKey(self): colVal=j # if colVal is not 0 thru 2 then no button was pressed and we can exit - if colVal <0 or colVal >2: + if colVal <0 or colVal > len(self.COLUMN): self.exit() return