summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2023-10-30 00:49:56 +0000
committerGitHub <noreply@github.com>2023-10-30 00:49:56 +0000
commit17c3182b1cc98adb5385c7c5223c775fce4d4dd9 (patch)
tree55cb44827a07e02b0051e7d5332c6447197b5412
parent559450a099539773e65adf4ab8c2e485344b7885 (diff)
Remove use of broken split.main (#22363)
-rw-r--r--data/schemas/keyboard.jsonschema9
-rw-r--r--keyboards/controllerworks/mini42/info.json1
-rw-r--r--keyboards/hillside/48/0_1/info.json1
-rw-r--r--keyboards/splitkb/aurora/corne/rev1/info.json1
-rw-r--r--keyboards/splitkb/aurora/helix/rev1/info.json1
-rw-r--r--keyboards/splitkb/aurora/lily58/rev1/info.json1
-rw-r--r--keyboards/splitkb/aurora/sofle_v2/rev1/info.json1
-rw-r--r--keyboards/splitkb/aurora/sweep/rev1/info.json1
-rw-r--r--keyboards/splitkb/kyria/rev3/info.json1
-rw-r--r--keyboards/tzarc/djinn/info.json1
-rwxr-xr-xlib/python/qmk/cli/generate/config_h.py18
-rw-r--r--lib/python/qmk/info.py52
12 files changed, 5 insertions, 83 deletions
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index 540ce4e42a..20216a7f86 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -681,10 +681,6 @@
681 } 681 }
682 } 682 }
683 }, 683 },
684 "main": {
685 "type": "string",
686 "enum": ["eeprom", "left", "matrix_grid", "pin", "right"]
687 },
688 "soft_serial_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, 684 "soft_serial_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
689 "soft_serial_speed": { 685 "soft_serial_speed": {
690 "type": "integer", 686 "type": "integer",
@@ -735,6 +731,11 @@
735 "polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int"}, 731 "polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int"},
736 "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} 732 "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
737 } 733 }
734 },
735 "main": {
736 "type": "string",
737 "enum": ["eeprom", "left", "matrix_grid", "pin", "right"],
738 "$comment": "Deprecated: use config.h options for now"
738 } 739 }
739 } 740 }
740 }, 741 },
diff --git a/keyboards/controllerworks/mini42/info.json b/keyboards/controllerworks/mini42/info.json
index c8c436c08f..5d1d56db1a 100644
--- a/keyboards/controllerworks/mini42/info.json
+++ b/keyboards/controllerworks/mini42/info.json
@@ -29,7 +29,6 @@
29 }, 29 },
30 "split": { 30 "split": {
31 "enabled": true, 31 "enabled": true,
32 "main": "left",
33 "matrix_pins": { 32 "matrix_pins": {
34 "right": { 33 "right": {
35 "direct": [ 34 "direct": [
diff --git a/keyboards/hillside/48/0_1/info.json b/keyboards/hillside/48/0_1/info.json
index 2159d1ca68..b6007f1f72 100644
--- a/keyboards/hillside/48/0_1/info.json
+++ b/keyboards/hillside/48/0_1/info.json
@@ -23,7 +23,6 @@
23 }, 23 },
24 "split": { 24 "split": {
25 "soft_serial_pin": "D2", 25 "soft_serial_pin": "D2",
26 "main": "left",
27 "encoder": { 26 "encoder": {
28 "right": { 27 "right": {
29 "rotary": [ 28 "rotary": [
diff --git a/keyboards/splitkb/aurora/corne/rev1/info.json b/keyboards/splitkb/aurora/corne/rev1/info.json
index 7d82577b00..13f0034d55 100644
--- a/keyboards/splitkb/aurora/corne/rev1/info.json
+++ b/keyboards/splitkb/aurora/corne/rev1/info.json
@@ -83,7 +83,6 @@
83 "matrix": [4, 5] 83 "matrix": [4, 5]
84 }, 84 },
85 "soft_serial_pin": "D2", 85 "soft_serial_pin": "D2",
86 "main": "pin",
87 "matrix_pins": { 86 "matrix_pins": {
88 "right": { 87 "right": {
89 "rows": ["B1", "B3", "B2", "B6"], 88 "rows": ["B1", "B3", "B2", "B6"],
diff --git a/keyboards/splitkb/aurora/helix/rev1/info.json b/keyboards/splitkb/aurora/helix/rev1/info.json
index 7c6acf0070..1fee04011a 100644
--- a/keyboards/splitkb/aurora/helix/rev1/info.json
+++ b/keyboards/splitkb/aurora/helix/rev1/info.json
@@ -118,7 +118,6 @@
118 ] 118 ]
119 } 119 }
120 }, 120 },
121 "main": "matrix_grid",
122 "matrix_pins": { 121 "matrix_pins": {
123 "right": { 122 "right": {
124 "cols": ["D4", "C6", "D7", "E6", "B4", "B5", "B6"], 123 "cols": ["D4", "C6", "D7", "E6", "B4", "B5", "B6"],
diff --git a/keyboards/splitkb/aurora/lily58/rev1/info.json b/keyboards/splitkb/aurora/lily58/rev1/info.json
index 2d251b96b2..9a6ad58a14 100644
--- a/keyboards/splitkb/aurora/lily58/rev1/info.json
+++ b/keyboards/splitkb/aurora/lily58/rev1/info.json
@@ -94,7 +94,6 @@
94 "matrix": [5, 0] 94 "matrix": [5, 0]
95 }, 95 },
96 "soft_serial_pin": "D2", 96 "soft_serial_pin": "D2",
97 "main": "matrix_grid",
98 "matrix_pins": { 97 "matrix_pins": {
99 "right": { 98 "right": {
100 "rows": ["F4", "D4", "B3", "B2", "B6"], 99 "rows": ["F4", "D4", "B3", "B2", "B6"],
diff --git a/keyboards/splitkb/aurora/sofle_v2/rev1/info.json b/keyboards/splitkb/aurora/sofle_v2/rev1/info.json
index b9b8b9da6b..266ea72148 100644
--- a/keyboards/splitkb/aurora/sofle_v2/rev1/info.json
+++ b/keyboards/splitkb/aurora/sofle_v2/rev1/info.json
@@ -112,7 +112,6 @@
112 ] 112 ]
113 } 113 }
114 }, 114 },
115 "main": "matrix_grid",
116 "matrix_pins": { 115 "matrix_pins": {
117 "right": { 116 "right": {
118 "cols": ["D7", "E6", "B4", "B5", "D4", "C6"], 117 "cols": ["D7", "E6", "B4", "B5", "D4", "C6"],
diff --git a/keyboards/splitkb/aurora/sweep/rev1/info.json b/keyboards/splitkb/aurora/sweep/rev1/info.json
index 7d7fec921f..b5588e2a3c 100644
--- a/keyboards/splitkb/aurora/sweep/rev1/info.json
+++ b/keyboards/splitkb/aurora/sweep/rev1/info.json
@@ -79,7 +79,6 @@
79 "matrix": [4, 4] 79 "matrix": [4, 4]
80 }, 80 },
81 "soft_serial_pin": "D2", 81 "soft_serial_pin": "D2",
82 "main": "pin",
83 "matrix_pins": { 82 "matrix_pins": {
84 "right": { 83 "right": {
85 "rows": ["B1", "F7", "F6", "B3"], 84 "rows": ["B1", "F7", "F6", "B3"],
diff --git a/keyboards/splitkb/kyria/rev3/info.json b/keyboards/splitkb/kyria/rev3/info.json
index 29bea95323..81b539c507 100644
--- a/keyboards/splitkb/kyria/rev3/info.json
+++ b/keyboards/splitkb/kyria/rev3/info.json
@@ -98,7 +98,6 @@
98 "matrix": [4, 6] 98 "matrix": [4, 6]
99 }, 99 },
100 "soft_serial_pin": "D2", 100 "soft_serial_pin": "D2",
101 "main": "matrix_grid",
102 "matrix_pins": { 101 "matrix_pins": {
103 "right": { 102 "right": {
104 "rows": ["F6", "F7", "B1", "B3"], 103 "rows": ["F6", "F7", "B1", "B3"],
diff --git a/keyboards/tzarc/djinn/info.json b/keyboards/tzarc/djinn/info.json
index 1546369307..64ed1da690 100644
--- a/keyboards/tzarc/djinn/info.json
+++ b/keyboards/tzarc/djinn/info.json
@@ -45,7 +45,6 @@
45 }, 45 },
46 "split": { 46 "split": {
47 "enabled": true, 47 "enabled": true,
48 "main": "pin",
49 "encoder": { 48 "encoder": {
50 "right": { 49 "right": {
51 "rotary": [ 50 "rotary": [
diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py
index c4260fde54..924834caef 100755
--- a/lib/python/qmk/cli/generate/config_h.py
+++ b/lib/python/qmk/cli/generate/config_h.py
@@ -141,24 +141,6 @@ def generate_encoder_config(encoder_json, config_h_lines, postfix=''):
141 141
142def generate_split_config(kb_info_json, config_h_lines): 142def generate_split_config(kb_info_json, config_h_lines):
143 """Generate the config.h lines for split boards.""" 143 """Generate the config.h lines for split boards."""
144 if 'primary' in kb_info_json['split']:
145 if kb_info_json['split']['primary'] in ('left', 'right'):
146 config_h_lines.append('')
147 config_h_lines.append('#ifndef MASTER_LEFT')
148 config_h_lines.append('# ifndef MASTER_RIGHT')
149 if kb_info_json['split']['primary'] == 'left':
150 config_h_lines.append('# define MASTER_LEFT')
151 elif kb_info_json['split']['primary'] == 'right':
152 config_h_lines.append('# define MASTER_RIGHT')
153 config_h_lines.append('# endif // MASTER_RIGHT')
154 config_h_lines.append('#endif // MASTER_LEFT')
155 elif kb_info_json['split']['primary'] == 'pin':
156 config_h_lines.append(generate_define('SPLIT_HAND_PIN'))
157 elif kb_info_json['split']['primary'] == 'matrix_grid':
158 config_h_lines.append(generate_define('SPLIT_HAND_MATRIX_GRID', f'{{ {",".join(kb_info_json["split"]["matrix_grid"])} }}'))
159 elif kb_info_json['split']['primary'] == 'eeprom':
160 config_h_lines.append(generate_define('EE_HANDS'))
161
162 if 'protocol' in kb_info_json['split'].get('transport', {}): 144 if 'protocol' in kb_info_json['split'].get('transport', {}):
163 if kb_info_json['split']['transport']['protocol'] == 'i2c': 145 if kb_info_json['split']['transport']['protocol'] == 'i2c':
164 config_h_lines.append(generate_define('USE_I2C')) 146 config_h_lines.append(generate_define('USE_I2C'))
diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py
index 265e6a645f..b56ec0fbff 100644
--- a/lib/python/qmk/info.py
+++ b/lib/python/qmk/info.py
@@ -352,57 +352,6 @@ def _extract_secure_unlock(info_data, config_c):
352 info_data['secure']['unlock_sequence'] = unlock_array 352 info_data['secure']['unlock_sequence'] = unlock_array
353 353
354 354
355def _extract_split_main(info_data, config_c):
356 """Populate data about the split configuration
357 """
358 # Figure out how the main half is determined
359 if config_c.get('SPLIT_HAND_PIN') is True:
360 if 'split' not in info_data:
361 info_data['split'] = {}
362
363 if 'main' in info_data['split']:
364 _log_warning(info_data, 'Split main hand is specified in both config.h (SPLIT_HAND_PIN) and info.json (split.main) (Value: %s), the config.h value wins.' % info_data['split']['main'])
365
366 info_data['split']['main'] = 'pin'
367
368 if config_c.get('SPLIT_HAND_MATRIX_GRID'):
369 if 'split' not in info_data:
370 info_data['split'] = {}
371
372 if 'main' in info_data['split']:
373 _log_warning(info_data, 'Split main hand is specified in both config.h (SPLIT_HAND_MATRIX_GRID) and info.json (split.main) (Value: %s), the config.h value wins.' % info_data['split']['main'])
374
375 info_data['split']['main'] = 'matrix_grid'
376 info_data['split']['matrix_grid'] = _extract_pins(config_c['SPLIT_HAND_MATRIX_GRID'])
377
378 if config_c.get('EE_HANDS') is True:
379 if 'split' not in info_data:
380 info_data['split'] = {}
381
382 if 'main' in info_data['split']:
383 _log_warning(info_data, 'Split main hand is specified in both config.h (EE_HANDS) and info.json (split.main) (Value: %s), the config.h value wins.' % info_data['split']['main'])
384
385 info_data['split']['main'] = 'eeprom'
386
387 if config_c.get('MASTER_RIGHT') is True:
388 if 'split' not in info_data:
389 info_data['split'] = {}
390
391 if 'main' in info_data['split']:
392 _log_warning(info_data, 'Split main hand is specified in both config.h (MASTER_RIGHT) and info.json (split.main) (Value: %s), the config.h value wins.' % info_data['split']['main'])
393
394 info_data['split']['main'] = 'right'
395
396 if config_c.get('MASTER_LEFT') is True:
397 if 'split' not in info_data:
398 info_data['split'] = {}
399
400 if 'main' in info_data['split']:
401 _log_warning(info_data, 'Split main hand is specified in both config.h (MASTER_LEFT) and info.json (split.main) (Value: %s), the config.h value wins.' % info_data['split']['main'])
402
403 info_data['split']['main'] = 'left'
404
405
406def _extract_split_transport(info_data, config_c): 355def _extract_split_transport(info_data, config_c):
407 # Figure out the transport method 356 # Figure out the transport method
408 if config_c.get('USE_I2C') is True: 357 if config_c.get('USE_I2C') is True:
@@ -594,7 +543,6 @@ def _extract_config_h(info_data, config_c):
594 _extract_matrix_info(info_data, config_c) 543 _extract_matrix_info(info_data, config_c)
595 _extract_audio(info_data, config_c) 544 _extract_audio(info_data, config_c)
596 _extract_secure_unlock(info_data, config_c) 545 _extract_secure_unlock(info_data, config_c)
597 _extract_split_main(info_data, config_c)
598 _extract_split_transport(info_data, config_c) 546 _extract_split_transport(info_data, config_c)
599 _extract_split_right_pins(info_data, config_c) 547 _extract_split_right_pins(info_data, config_c)
600 _extract_encoders(info_data, config_c) 548 _extract_encoders(info_data, config_c)