Skip to content

Commit

Permalink
i give up
Browse files Browse the repository at this point in the history
  • Loading branch information
rootiest committed Jul 31, 2023
1 parent dd6650a commit 2ccf36e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions klipper/klippy/extras/printcfg.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2670,23 +2670,23 @@ gcode:
{% endfor %}
{% if vars.config_error == True %}
{% set fans_found = fans_found|sort %}
{% if config.printcfg.extra_fans|sort == fans_found|sort or config.printcfg.extra_fans|length == fans_found|length or config.printcfg.extra_fans|string == fans_found|string %}
{% set winning = '<span class=success--text>All controllable fans defined.</span>\n' %}
{ action_respond_info( "{}".format( winning ) ) }
{% elif fans == [] %}
{% if fans == [] %}
{% set fans = fans_found %}
{% set warning = '<span class=error--text>Controllable fans found but no list defined.</span>\n' %}
{% set warning = warning + '<span class=warning--text>Please add under</span> '.format(old_fans|string) %}
{% set warning = warning + '<span class=info--text>[printcfg]</span> <span class=warning--text>the following:</span>\n' %}
{ action_respond_info( "{}extra_fans: {}".format( warning, fans|string ) ) }
{% else %}
{% elif config.printcfg.extra_fans|length < fans_found|length %}
{% set warning = '<span class=error--text>Additional controllable fans found not defined in list.</span>\n' %}
{% set warning = warning + '<span class=warning--text>Please replace:</span>\nextra_fans: {}\n<span class=warning--text>under</span> '.format(old_fans) %}
{% set warning = warning + '<span class=info--text>[printcfg]</span> <span class=warning--text>with the following:</span>\n' %}
{% for fan in fans_found %}
{% set _ = fans.append( fan ) if fan not in fans %}
{% endfor %}
{ action_respond_info( "{}extra_fans: {}".format( warning, fans|string ) ) }
{% else %}
{% set winning = '<span class=success--text>All controllable fans defined.</span>\n' %}
{ action_respond_info( "{}".format( winning ) ) }
{% endif %}
{% endif %}
SET_GCODE_VARIABLE MACRO=_setup_extra_fans VARIABLE=fans VALUE="{fans}"
Expand Down

0 comments on commit 2ccf36e

Please sign in to comment.