Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STEAPP-861: fixed bug, the LED color did not match the present #230

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading