diff --git a/kiplot/bom/bom.py b/kiplot/bom/bom.py index 5bf69eda..65abcb81 100644 --- a/kiplot/bom/bom.py +++ b/kiplot/bom/bom.py @@ -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 diff --git a/kiplot/bom/units.py b/kiplot/bom/units.py index 7fa9e82c..4e65409b 100644 --- a/kiplot/bom/units.py +++ b/kiplot/bom/units.py @@ -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: