Skip to content

Commit

Permalink
Merge pull request #230 from stereotech/STEAPP-861
Browse files Browse the repository at this point in the history
STEAPP-861: fixed bug, the LED color did not match the present
  • Loading branch information
frylock34 authored Jan 29, 2024
2 parents d844fe9 + f98df77 commit a422b46
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion stereotech_config/530/chamber_2.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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]
Expand All @@ -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" %}
Expand Down
6 changes: 4 additions & 2 deletions stereotech_config/630/chamber.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a422b46

Please sign in to comment.