From bc0756f294f9555267dbd7007478804f537614c1 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 16 Sep 2022 12:05:25 +1000 Subject: Disconnect `usb.device_ver` (#18259) --- lib/python/qmk/cli/generate/layouts.py | 6 ------ lib/python/qmk/info.py | 14 -------------- 2 files changed, 20 deletions(-) (limited to 'lib/python/qmk') diff --git a/lib/python/qmk/cli/generate/layouts.py b/lib/python/qmk/cli/generate/layouts.py index 193633baf6..8336f36b50 100755 --- a/lib/python/qmk/cli/generate/layouts.py +++ b/lib/python/qmk/cli/generate/layouts.py @@ -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") diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index b039c2c424..834f7d9170 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -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 -- cgit v1.2.3