Skip to content

Commit

Permalink
log error when the coordmapping is not guessable (#1016)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanLunge authored Aug 1, 2024
1 parent 9f517d0 commit ccfd54f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kmk/modules/split.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def during_bootup(self, keyboard):
)

# Attempt to sanely guess a coord_mapping if one is not provided.
if not keyboard.coord_mapping:
if not keyboard.coord_mapping and keyboard.row_pins and keyboard.col_pins:
cm = []

rows_to_calc = len(keyboard.row_pins)
Expand All @@ -158,6 +158,8 @@ def during_bootup(self, keyboard):
cm.append(cols_to_calc * (rows_to_calc + ridx) + cidx)

keyboard.coord_mapping = tuple(cm)
else:
print('Error: please provide coord_mapping for custom scanner')

if self.split_side == SplitSide.RIGHT:
offset = self.split_offset
Expand Down

0 comments on commit ccfd54f

Please sign in to comment.