|
@@ -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
|
|
|
|