Skip to content

Commit

Permalink
Lint IV
Browse files Browse the repository at this point in the history
  • Loading branch information
regicidalplutophage authored Nov 7, 2024
1 parent de212c9 commit 8ccf24e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions kmk/scanners/keypad.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@


class KeypadScanner(Scanner):
"""
'''
Translation layer around a CircuitPython 7 keypad scanner.
:param pin_map: A sequence of (row, column) tuples for each key.
:param kp: An instance of the keypad class.
"""
'''

@property
def key_count(self):
return self.keypad.key_count

def scan_for_changes(self):
"""
'''
Scan for key events and return a key report if an event exists.
The key report is a byte array with contents [row, col, True if pressed else False]
"""
'''
ev = self.keypad.events.get()
if ev and self.offset:
return keypad.Event(ev.key_number + self.offset, ev.pressed)
return ev


class MatrixScanner(KeypadScanner):
"""
'''
Row/Column matrix using the CircuitPython 7 keypad scanner.
:param row_pins: A sequence of pins used for rows.
:param col_pins: A sequence of pins used for columns.
:param direction: The diode orientation of the matrix.
"""
'''

def __init__(
self,
Expand Down Expand Up @@ -67,11 +67,11 @@ def __init__(


class KeysScanner(KeypadScanner):
"""
'''
GPIO-per-key 'matrix' using the native CircuitPython 7 keypad scanner.
:param pins: An array of arrays of CircuitPython Pin objects, such that pins[r][c] is the pin for row r, column c.
"""
'''

def __init__(
self,
Expand Down

0 comments on commit 8ccf24e

Please sign in to comment.