mirror of
https://github.com/firewalkwithm3/qmk_firmware.git
synced 2024-11-22 03:21:48 +08:00
Remove use of broken split.main (#22363)
This commit is contained in:
parent
559450a099
commit
17c3182b1c
|
@ -681,10 +681,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"main": {
|
||||
"type": "string",
|
||||
"enum": ["eeprom", "left", "matrix_grid", "pin", "right"]
|
||||
},
|
||||
"soft_serial_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"soft_serial_speed": {
|
||||
"type": "integer",
|
||||
|
@ -735,6 +731,11 @@
|
|||
"polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
}
|
||||
},
|
||||
"main": {
|
||||
"type": "string",
|
||||
"enum": ["eeprom", "left", "matrix_grid", "pin", "right"],
|
||||
"$comment": "Deprecated: use config.h options for now"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
},
|
||||
"split": {
|
||||
"enabled": true,
|
||||
"main": "left",
|
||||
"matrix_pins": {
|
||||
"right": {
|
||||
"direct": [
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
},
|
||||
"split": {
|
||||
"soft_serial_pin": "D2",
|
||||
"main": "left",
|
||||
"encoder": {
|
||||
"right": {
|
||||
"rotary": [
|
||||
|
|
|
@ -83,7 +83,6 @@
|
|||
"matrix": [4, 5]
|
||||
},
|
||||
"soft_serial_pin": "D2",
|
||||
"main": "pin",
|
||||
"matrix_pins": {
|
||||
"right": {
|
||||
"rows": ["B1", "B3", "B2", "B6"],
|
||||
|
|
|
@ -118,7 +118,6 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"main": "matrix_grid",
|
||||
"matrix_pins": {
|
||||
"right": {
|
||||
"cols": ["D4", "C6", "D7", "E6", "B4", "B5", "B6"],
|
||||
|
|
|
@ -94,7 +94,6 @@
|
|||
"matrix": [5, 0]
|
||||
},
|
||||
"soft_serial_pin": "D2",
|
||||
"main": "matrix_grid",
|
||||
"matrix_pins": {
|
||||
"right": {
|
||||
"rows": ["F4", "D4", "B3", "B2", "B6"],
|
||||
|
|
|
@ -112,7 +112,6 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"main": "matrix_grid",
|
||||
"matrix_pins": {
|
||||
"right": {
|
||||
"cols": ["D7", "E6", "B4", "B5", "D4", "C6"],
|
||||
|
|
|
@ -79,7 +79,6 @@
|
|||
"matrix": [4, 4]
|
||||
},
|
||||
"soft_serial_pin": "D2",
|
||||
"main": "pin",
|
||||
"matrix_pins": {
|
||||
"right": {
|
||||
"rows": ["B1", "F7", "F6", "B3"],
|
||||
|
|
|
@ -98,7 +98,6 @@
|
|||
"matrix": [4, 6]
|
||||
},
|
||||
"soft_serial_pin": "D2",
|
||||
"main": "matrix_grid",
|
||||
"matrix_pins": {
|
||||
"right": {
|
||||
"rows": ["F6", "F7", "B1", "B3"],
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
},
|
||||
"split": {
|
||||
"enabled": true,
|
||||
"main": "pin",
|
||||
"encoder": {
|
||||
"right": {
|
||||
"rotary": [
|
||||
|
|
|
@ -141,24 +141,6 @@ def generate_encoder_config(encoder_json, config_h_lines, postfix=''):
|
|||
|
||||
def generate_split_config(kb_info_json, config_h_lines):
|
||||
"""Generate the config.h lines for split boards."""
|
||||
if 'primary' in kb_info_json['split']:
|
||||
if kb_info_json['split']['primary'] in ('left', 'right'):
|
||||
config_h_lines.append('')
|
||||
config_h_lines.append('#ifndef MASTER_LEFT')
|
||||
config_h_lines.append('# ifndef MASTER_RIGHT')
|
||||
if kb_info_json['split']['primary'] == 'left':
|
||||
config_h_lines.append('# define MASTER_LEFT')
|
||||
elif kb_info_json['split']['primary'] == 'right':
|
||||
config_h_lines.append('# define MASTER_RIGHT')
|
||||
config_h_lines.append('# endif // MASTER_RIGHT')
|
||||
config_h_lines.append('#endif // MASTER_LEFT')
|
||||
elif kb_info_json['split']['primary'] == 'pin':
|
||||
config_h_lines.append(generate_define('SPLIT_HAND_PIN'))
|
||||
elif kb_info_json['split']['primary'] == 'matrix_grid':
|
||||
config_h_lines.append(generate_define('SPLIT_HAND_MATRIX_GRID', f'{{ {",".join(kb_info_json["split"]["matrix_grid"])} }}'))
|
||||
elif kb_info_json['split']['primary'] == 'eeprom':
|
||||
config_h_lines.append(generate_define('EE_HANDS'))
|
||||
|
||||
if 'protocol' in kb_info_json['split'].get('transport', {}):
|
||||
if kb_info_json['split']['transport']['protocol'] == 'i2c':
|
||||
config_h_lines.append(generate_define('USE_I2C'))
|
||||
|
|
|
@ -352,57 +352,6 @@ def _extract_secure_unlock(info_data, config_c):
|
|||
info_data['secure']['unlock_sequence'] = unlock_array
|
||||
|
||||
|
||||
def _extract_split_main(info_data, config_c):
|
||||
"""Populate data about the split configuration
|
||||
"""
|
||||
# Figure out how the main half is determined
|
||||
if config_c.get('SPLIT_HAND_PIN') is True:
|
||||
if 'split' not in info_data:
|
||||
info_data['split'] = {}
|
||||
|
||||
if 'main' in info_data['split']:
|
||||
_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'])
|
||||
|
||||
info_data['split']['main'] = 'pin'
|
||||
|
||||
if config_c.get('SPLIT_HAND_MATRIX_GRID'):
|
||||
if 'split' not in info_data:
|
||||
info_data['split'] = {}
|
||||
|
||||
if 'main' in info_data['split']:
|
||||
_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'])
|
||||
|
||||
info_data['split']['main'] = 'matrix_grid'
|
||||
info_data['split']['matrix_grid'] = _extract_pins(config_c['SPLIT_HAND_MATRIX_GRID'])
|
||||
|
||||
if config_c.get('EE_HANDS') is True:
|
||||
if 'split' not in info_data:
|
||||
info_data['split'] = {}
|
||||
|
||||
if 'main' in info_data['split']:
|
||||
_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'])
|
||||
|
||||
info_data['split']['main'] = 'eeprom'
|
||||
|
||||
if config_c.get('MASTER_RIGHT') is True:
|
||||
if 'split' not in info_data:
|
||||
info_data['split'] = {}
|
||||
|
||||
if 'main' in info_data['split']:
|
||||
_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'])
|
||||
|
||||
info_data['split']['main'] = 'right'
|
||||
|
||||
if config_c.get('MASTER_LEFT') is True:
|
||||
if 'split' not in info_data:
|
||||
info_data['split'] = {}
|
||||
|
||||
if 'main' in info_data['split']:
|
||||
_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'])
|
||||
|
||||
info_data['split']['main'] = 'left'
|
||||
|
||||
|
||||
def _extract_split_transport(info_data, config_c):
|
||||
# Figure out the transport method
|
||||
if config_c.get('USE_I2C') is True:
|
||||
|
@ -594,7 +543,6 @@ def _extract_config_h(info_data, config_c):
|
|||
_extract_matrix_info(info_data, config_c)
|
||||
_extract_audio(info_data, config_c)
|
||||
_extract_secure_unlock(info_data, config_c)
|
||||
_extract_split_main(info_data, config_c)
|
||||
_extract_split_transport(info_data, config_c)
|
||||
_extract_split_right_pins(info_data, config_c)
|
||||
_extract_encoders(info_data, config_c)
|
||||
|
|
Loading…
Reference in a new issue