From f98df77beba6b6c7553d20e30028f2d188eaedef Mon Sep 17 00:00:00 2001 From: sokolovjek Date: Tue, 9 Jan 2024 11:54:31 +0000 Subject: [PATCH] STEAPP-861: fixed bug, the LED color did not match the present --- stereotech_config/530/chamber_2.cfg | 6 +++++- stereotech_config/630/chamber.cfg | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/stereotech_config/530/chamber_2.cfg b/stereotech_config/530/chamber_2.cfg index 268140b34afe..443a669ab16d 100644 --- a/stereotech_config/530/chamber_2.cfg +++ b/stereotech_config/530/chamber_2.cfg @@ -71,6 +71,7 @@ gcode: {% set blue_value = blue_input - white_value %} M400 SET_LED_TEMPLATE LED=case_led TEMPLATE=led_color param_red={red_value / 255} param_green={green_value / 255} param_blue={blue_value / 255} param_white={white_value / 255} + G4 P100 ;SET_LED LED=case_led RED={red_value / 255} GREEN={green_value / 255} BLUE={blue_value / 255} WHITE={white_value / 255} {% if duration > 0 %} UPDATE_DELAYED_GCODE ID=return_color DURATION={duration} @@ -80,6 +81,7 @@ gcode: gcode: M400 SET_LED_TEMPLATE LED=case_led TEMPLATE=led_color param_red={printer["gcode_macro M150"].current_red_value} param_green={printer["gcode_macro M150"].current_green_value} param_blue={printer["gcode_macro M150"].current_blue_value} param_white={printer["gcode_macro M150"].current_white_value} + G4 P100 ;SET_LED LED=case_led RED={printer["gcode_macro M150"].current_red_value} GREEN={printer["gcode_macro M150"].current_green_value} BLUE={printer["gcode_macro M150"].current_blue_value} WHITE={printer["gcode_macro M150"].current_white_value} [gcode_macro TOGGLE_LIGHT] @@ -100,9 +102,11 @@ gcode: [gcode_macro STATUS_LED] gcode: - {% set status = params.STATUS|default(printing) %} + {% set status = params.STATUS|default("printing") %} {% if status == "started" %} + M400 SET_LED_TEMPLATE LED=case_led TEMPLATE=led_heatup + G4 P100 {% elif status == "paused" %} M150 R255 G255 B0 D5 {% elif status == "completed" %} diff --git a/stereotech_config/630/chamber.cfg b/stereotech_config/630/chamber.cfg index 810cfb358ee3..8066f22efb6a 100644 --- a/stereotech_config/630/chamber.cfg +++ b/stereotech_config/630/chamber.cfg @@ -70,13 +70,15 @@ gcode: [gcode_macro STATUS_LED] gcode: - {% set status = params.STATUS|default(printing) %} + {% set status = params.STATUS|default("printing") %} + M400 {% if status == "started" %} - {% set heater = params.HEATER|default(extruder) %} + {% set heater = params.HEATER|default("extruder") %} SET_LED_EFFECT EFFECT=heatup_{heater} REPLACE=1 FADETIME=2.0 {% else %} SET_LED_EFFECT EFFECT={status} REPLACE=1 FADETIME=2.0 {% endif %} + G4 P100 [led_effect startup] autostart: true