Show cable color in BOM similar to wires and connectors

This commit is contained in:
KV 2021-02-07 20:50:01 +01:00
parent 09243fb964
commit 66fdfc7374

View File

@ -89,7 +89,8 @@ def generate_bom(harness: "Harness") -> List[BOMEntry]:
+ (f', {cable.type}' if cable.type else '')
+ (f', {cable.wirecount}')
+ (f' x {cable.gauge} {cable.gauge_unit}' if cable.gauge else ' wires')
+ (' shielded' if cable.shield else ''))
+ ( ' shielded' if cable.shield else '')
+ (f', {translate_color(cable.color, harness.options.color_mode)}' if cable.color else ''))
bom_entries.append({
'description': description, 'qty': cable.length, 'unit': cable.length_unit, 'designators': cable.name if cable.show_name else None,
**optional_fields(cable),