Avoid to apply RLC sorting to "RL*" components.

Also apply it to "RV*" and "RT*"
This commit is contained in:
SET 2020-08-13 12:58:21 -03:00
parent 1067f364c8
commit bfc6e07481
2 changed files with 5 additions and 2 deletions

View File

@ -35,6 +35,10 @@ DNC = {
"no change": 1,
"fixed": 1
}
# RV == Resistor Variable
# RN == Resistor 'N'(Pack)
# RT == Thermistor
RLC_PREFIX = {'R': 1, 'L': 1, 'C': 1, 'RV': 1, 'RN': 1, 'RT': 1}
def compare_value(c1, c2, cfg):
@ -310,7 +314,7 @@ def test_reg_include(cfg, c):
def get_value_sort(comp):
""" Try to better sort R, L and C components """
pref = comp.ref_prefix
if pref in 'RLC' or pref == 'RV':
if pref in RLC_PREFIX:
res = comp_match(comp.value)
if res:
value, mult, unit = res

View File

@ -98,7 +98,6 @@ def comp_match(component):
"""
original = component
logger.debug(component)
# Convert the decimal point from the current locale to a '.'
global decimal_point
if not decimal_point: