-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcaselight.cfg
86 lines (78 loc) · 2.71 KB
/
caselight.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Macros for setting the status leds on the Voron enclosure (or for any neopixel-type leds).
#
# You will need to configure a neopixel (or other addressable led, such as dotstar). See
# https://www.klipper3d.org/Config_Reference.html#neopixel for configuration details.
#
# CONFIGURATION
#
# Example neopixel configuration:
# [neopixel caselight]
# pin: <your pin>
# # The pin connected to the neopixel. This parameter must be
# # provided.
# chain_count: 54
# # The number of Neopixel chips that are "daisy chained" to the
# # provided pin. The default is 1 (which indicates only a single
# # Neopixel is connected to the pin).
# color_order: GRBW
# # Set the pixel order required by the LED hardware. Options are GRB,
# # RGB, GRBW, or RGBW. The default is GRB.
# initial_RED: 0.0
# initial_GREEN: 0.0
# initial_BLUE: 0.0
# initial_WHITE: 0.0
# # Sets the initial LED color of the Neopixel. Each value should be
# # between 0.0 and 1.0. The WHITE option is only available on RGBW
# # LEDs. The default for each color is 0.#
#
# Most configuration for the macros can be done by modifying the variables in the _sb_vars macro
# at the start of this file.
#
# MACROS
#
# The following status macros are available:
# CASELIGHT_ON ; All on
# CASELIGHT_OFF ; All off
# CASELIGHT_HEATING ; Yellow logo and nozzle
#
# You will need to add the status macros into your configuration before the matching command
#
# Example:
# [gcode_macro print_start]
# gcode:
# CASELIGHT_ON
# G28
# CASELIGHT_HEATING
# M140 S{bed_temp}
# M104 S{e0_temp}
# ...
# CASELIGHT_OFF
#
# Contributed by Voron discord users wile.e, Tetsunosuke, and etherwalker
[gcode_macro _enclosure_vars]
# User settings for the StealthBurner status leds. You can change the status colors and led
# configurations for the logo and nozzle here.
variable_colors: {
'off': {'r': 0.0, 'g': 0.0, 'b': 0.0, 'w': 0.0},
'on': {'r': 0.8, 'g': 0.8, 'b': 0.8, 'w':1.0},
'heating': {'r': 0.8, 'g': 0.35, 'b': 0.0, 'w':0.0},
}
variable_led_name: "caselight"
# The name of the addressable LED chain that contains the logo LED(s)
gcode:
; Do nothing
[gcode_macro _set_caselight_leds]
gcode:
{% set color_name = params.COLOR %}
{% set color = printer["gcode_macro _enclosure_vars"].colors[color_name] %}
{% set led = printer["gcode_macro _enclosure_vars"]["led_name"] %}
set_led led={led} red={color.r} green={color.g} blue={color.b} white={color.w}
[gcode_macro caselight_on]
gcode:
_set_caselight_leds color="on"
[gcode_macro caselight_off]
gcode:
_set_caselight_leds color="off"
[gcode_macro caselight_heating]
gcode:
_set_caselight_leds color="heating"