From ccfd54fc3238e63528a23ba5354d5705f44ff362 Mon Sep 17 00:00:00 2001 From: Jan Lunge Date: Thu, 1 Aug 2024 09:14:31 +0200 Subject: [PATCH] log error when the coordmapping is not guessable (#1016) --- kmk/modules/split.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kmk/modules/split.py b/kmk/modules/split.py index 164a9a25e..bbf9cfc67 100644 --- a/kmk/modules/split.py +++ b/kmk/modules/split.py @@ -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) @@ -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