Update AddCoolingProfile.py

Found a bug.  The ";LAYER:" line was not being added to the "modified data" string when in "single_fan_by_feature" mode.

Update AddCoolingProfile.py

bug fix for the bug fix.
This commit is contained in:
GregValiant 2025-04-16 09:22:30 -04:00
parent 03aa64448a
commit 1e18e0e63d

View file

@ -776,7 +776,6 @@ class AddCoolingProfile(Script):
for line in lines:
if ";LAYER:" in line:
layer_number = str(line.split(":")[1])
continue
if int(layer_number) >= int(the_start_layer) and int(layer_number) < int(the_end_layer)-1:
temp = line.split(" ")[0]
try:
@ -789,6 +788,7 @@ class AddCoolingProfile(Script):
if feature_fan_combing == True:
modified_data += "M106 S0" + t0_fan + "\n"
modified_data += line + "\n"
# If an End Layer is defined and is less than the last layer then insert the Final Speed
if line == ";LAYER:" + str(the_end_layer) and the_end_is_enabled == True:
modified_data += feature_speed_list[len(feature_speed_list) - 1] + t0_fan + "\n"