Disconnect usb.device_ver
(#18259)
This commit is contained in:
parent
b223e29921
commit
bc0756f294
@ -20,9 +20,7 @@
|
||||
"COMBO_COUNT": {"info_key": "combo.count", "value_type": "int"},
|
||||
"COMBO_TERM": {"info_key": "combo.term", "value_type": "int"},
|
||||
"DEBOUNCE": {"info_key": "debounce", "value_type": "int"},
|
||||
"DEVICE_VER": {"info_key": "usb.device_ver", "value_type": "hex"},
|
||||
# TODO: Replace ^^^ with vvv
|
||||
#"DEVICE_VER": {"info_key": "usb.device_version", "value_type": "bcd_version"},
|
||||
"DEVICE_VER": {"info_key": "usb.device_version", "value_type": "bcd_version"},
|
||||
"DIODE_DIRECTION": {"info_key": "diode_direction"},
|
||||
"DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.double_tap_shift_turns_on", "value_type": "bool"},
|
||||
"FORCE_NKRO": {"info_key": "usb.force_nkro", "value_type": "bool"},
|
||||
|
@ -9,12 +9,6 @@ from qmk.keyboard import keyboard_completer, keyboard_folder
|
||||
from qmk.path import is_keyboard, normpath
|
||||
from qmk.commands import dump_lines
|
||||
|
||||
usb_properties = {
|
||||
'vid': 'VENDOR_ID',
|
||||
'pid': 'PRODUCT_ID',
|
||||
'device_ver': 'DEVICE_VER',
|
||||
}
|
||||
|
||||
|
||||
@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
|
||||
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
|
||||
|
@ -437,19 +437,6 @@ def _extract_matrix_info(info_data, config_c):
|
||||
return info_data
|
||||
|
||||
|
||||
# TODO: kill off usb.device_ver in favor of usb.device_version
|
||||
def _extract_device_version(info_data):
|
||||
if info_data.get('usb'):
|
||||
if info_data['usb'].get('device_version') and not info_data['usb'].get('device_ver'):
|
||||
(major, minor, revision) = info_data['usb']['device_version'].split('.', 3)
|
||||
info_data['usb']['device_ver'] = f'0x{major.zfill(2)}{minor}{revision}'
|
||||
if not info_data['usb'].get('device_version') and info_data['usb'].get('device_ver'):
|
||||
major = int(info_data['usb']['device_ver'][2:4])
|
||||
minor = int(info_data['usb']['device_ver'][4])
|
||||
revision = int(info_data['usb']['device_ver'][5])
|
||||
info_data['usb']['device_version'] = f'{major}.{minor}.{revision}'
|
||||
|
||||
|
||||
def _config_to_json(key_type, config_value):
|
||||
"""Convert config value using spec
|
||||
"""
|
||||
@ -535,7 +522,6 @@ def _extract_config_h(info_data, config_c):
|
||||
_extract_split_right_pins(info_data, config_c)
|
||||
_extract_encoders(info_data, config_c)
|
||||
_extract_split_encoders(info_data, config_c)
|
||||
_extract_device_version(info_data)
|
||||
|
||||
return info_data
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user