Skip to content

Commit

Permalink
Expose it in other scanners as well
Browse files Browse the repository at this point in the history
  • Loading branch information
regicidalplutophage authored Nov 7, 2024
1 parent cd0b023 commit a371c85
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kmk/scanners/keypad.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def __init__(
*,
columns_to_anodes=DiodeOrientation.COL2ROW,
interval=0.02,
max_events=64,
debounce_threshold=1,
max_events=64,
):
self.keypad = keypad.KeyMatrix(
row_pins,
Expand All @@ -71,13 +71,15 @@ def __init__(
value_when_pressed=False,
pull=True,
interval=0.02,
debounce_threshold=1,
max_events=64,
):
self.keypad = keypad.Keys(
pins,
value_when_pressed=value_when_pressed,
pull=pull,
interval=interval,
debounce_threshold=debounce_threshold,
max_events=max_events,
)
super().__init__()
Expand All @@ -94,6 +96,7 @@ def __init__(
key_count,
value_when_pressed=False,
interval=0.02,
debounce_threshold=1,
max_events=64,
):
self.keypad = keypad.ShiftRegisterKeys(
Expand All @@ -104,6 +107,7 @@ def __init__(
key_count=key_count,
value_when_pressed=value_when_pressed,
interval=interval,
debounce_threshold=debounce_threshold,
max_events=max_events,
)
super().__init__()

0 comments on commit a371c85

Please sign in to comment.