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

Enable case lighting with caselight_on_at_startup #563

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mattpolito
Copy link
Contributor

Using white caselights fcob_white, only the status lights on toolhead are enabled with the caselight_on_at_startup variable set to True.

This change turns on caselights using LIGHT_ON/LIGHT_OFF macros

@Benoitone
Copy link
Collaborator

hello, LIGHT_ON/LIGHT_OFF macros are only available when fcob_white is included and so light_enabled exist.
That's Ok like this for you because you have fcob_white AND status_leds
So, you must rework a little bit your PR to be correct:
Maybe:

[gcode_macro _INIT_LEDS]
gcode:
    {% if printer["gcode_macro _USER_VARIABLES"].status_leds_enabled or printer["gcode_macro _USER_VARIABLES"].status_leds_caselight_enabled or printer["gcode_macro _USER_VARIABLES"].light_enabled %}
        {% if printer["gcode_macro _USER_VARIABLES"].caselight_on_at_startup|default(False) %}
            {% if printer["gcode_macro _USER_VARIABLES"].light_enabled %}
                LIGHT_ON
            {% endif %}
            {% if printer["gcode_macro _USER_VARIABLES"].status_leds_enabled or printer["gcode_macro _USER_VARIABLES"].status_leds_caselight_enabled %}
                STATUS_LEDS COLOR="READY"
            {% endif %}
        {% else %}
            {% if printer["gcode_macro _USER_VARIABLES"].light_enabled %}
                LIGHT_OFF
            {% endif %}
            {% if printer["gcode_macro _USER_VARIABLES"].status_leds_enabled or printer["gcode_macro _USER_VARIABLES"].status_leds_caselight_enabled %}
                STATUS_LEDS COLOR="OFF"
            {% endif %}
        {% endif %}
    {% endif %}

@mattpolito
Copy link
Contributor Author

@Benoitone this seems like a sane change, I can update the PR. Thanks for your input

Copy link

📌 This pull request has been marked as stale because it has not had activity in the past 30 days.
Please update the PR or comment to keep it active. Otherwise, this will be closed in 14 days.
We appreciate your contribution!

@mattpolito
Copy link
Contributor Author

ping

Copy link

📌 This pull request has been marked as stale because it has not had activity in the past 30 days.
Please update the PR or comment to keep it active. Otherwise, this will be closed in 14 days.
We appreciate your contribution!

Copy link

📌 This pull request has been marked as stale because it has not had activity in the past 30 days.
Please update the PR or comment to keep it active. Otherwise, this will be closed in 14 days.
We appreciate your contribution!

Copy link

📌 This pull request has been marked as stale because it has not had activity in the past 30 days.
Please update the PR or comment to keep it active. Otherwise, this will be closed in 14 days.
We appreciate your contribution!

1 similar comment
Copy link

📌 This pull request has been marked as stale because it has not had activity in the past 30 days.
Please update the PR or comment to keep it active. Otherwise, this will be closed in 14 days.
We appreciate your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants