Avoid to apply RLC sorting to "RL*" components.
Also apply it to "RV*" and "RT*"
This commit is contained in:
parent
1067f364c8
commit
bfc6e07481
|
|
@ -35,6 +35,10 @@ DNC = {
|
||||||
"no change": 1,
|
"no change": 1,
|
||||||
"fixed": 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):
|
def compare_value(c1, c2, cfg):
|
||||||
|
|
@ -310,7 +314,7 @@ def test_reg_include(cfg, c):
|
||||||
def get_value_sort(comp):
|
def get_value_sort(comp):
|
||||||
""" Try to better sort R, L and C components """
|
""" Try to better sort R, L and C components """
|
||||||
pref = comp.ref_prefix
|
pref = comp.ref_prefix
|
||||||
if pref in 'RLC' or pref == 'RV':
|
if pref in RLC_PREFIX:
|
||||||
res = comp_match(comp.value)
|
res = comp_match(comp.value)
|
||||||
if res:
|
if res:
|
||||||
value, mult, unit = res
|
value, mult, unit = res
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,6 @@ def comp_match(component):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
original = component
|
original = component
|
||||||
logger.debug(component)
|
|
||||||
# Convert the decimal point from the current locale to a '.'
|
# Convert the decimal point from the current locale to a '.'
|
||||||
global decimal_point
|
global decimal_point
|
||||||
if not decimal_point:
|
if not decimal_point:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue