updating master

This commit is contained in:
Senad Uka
2017-11-27 17:04:51 +01:00
parent b4e45199b7
commit efb4547a37
4 changed files with 36 additions and 11 deletions

View File

@@ -1,12 +1,19 @@
from math import ceil
from helix.constants.panel_type import PanelType
from helix.constants.parts import *
# This story askes for this special parts to be showed
# www.pivotaltracker.com/n/projects/1544689/stories/148016595
PARTS_SHOWN_EVEN_WITH_0_ELEMENTS = [
delta_kit_inverter_mount,
delta_kit_inverter_mount_dt
]
def add_parts_to_list(parts_list, parts_to_add, multiplier=1):
for part, quantity in parts_to_add.items():
previous_value = parts_list.get(part) or 0
if quantity != 0:
if quantity != 0 or part in PARTS_SHOWN_EVEN_WITH_0_ELEMENTS:
parts_list[part] = previous_value + quantity * multiplier