forked from zellneralex/klipper_config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuttons.cfg
54 lines (50 loc) · 1.95 KB
/
buttons.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
[gcode_button E_BTN]
pin: gpio22
press_gcode:
{ action_emergency_stop("BIG RED Mushroom!") }
##TODO find a working method fot his
# release_gcode:
# { action_call_remote_method("printer.reset_firmware") }
[gcode_button caselight_toggle]
pin: ^!ramps:ar40
press_gcode:
{action_respond_info("yep toggle pressed")}
CASELIGHT_TOGGLE
[gcode_button CASELIGHT_ONE]
pin: ramps:analog9
analog_pullup_resistor: 2000
analog_range: 2000, 3000
press_gcode:
# QUERY_ADC NAME=adc_button:ramps:analog9 PULLUP=2000
CASELIGHT_TOGGLE
[gcode_button CASELIGHT_TWO]
pin: ramps:analog9
analog_pullup_resistor: 2000
analog_range: 5000,7000
press_gcode:
{% if (printer.save_variables.variables.leds.caselight.mode == 'manual') or
((printer.save_variables.variables.leds.caselight.mode == 'manual') and
not (printer.save_variables.variables.leds.caselight.state == 'off')) %}
{action_respond_info("caselight brighter")}
{% set brightness = printer["gcode_macro _USER_VARIABLE"].neopixel_leds['caselight'].brightness_mx + 20 %}
# QUERY_ADC NAME=adc_button:ramps:analog9 PULLUP=2000
_SET_BRIGHTNESS LED="caselight" BRIGHTNESS={brightness}
{% else %}
{action_respond_info("Button caselight_two bump")}
{% endif %}
[gcode_button CASELIGHT_THREE]
pin: ramps:analog9
analog_pullup_resistor: 2000
# analog_range: 10000,15000
analog_range: 10000,18000
press_gcode:
{% if (printer.save_variables.variables.leds.caselight.mode == 'manual') or
((printer.save_variables.variables.leds.caselight.mode == 'manual') and
not (printer.save_variables.variables.leds.caselight.state == 'off')) %}
{action_respond_info("caselight dimmer")}
{% set brightness = printer["gcode_macro _USER_VARIABLE"].neopixel_leds['caselight'].brightness_mx - 20 %}
# QUERY_ADC NAME=adc_button:ramps:analog9 PULLUP=2000
_SET_BRIGHTNESS LED="caselight" BRIGHTNESS={brightness}
{% else %}
{action_respond_info("Button caselight_three bump")}
{% endif %}