-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_GENERAL_DEBUG.cfg
37 lines (34 loc) · 1.82 KB
/
_GENERAL_DEBUG.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
#.................................................................................................................
# _GENERAL_DEBUG - required parameters: MSG / Usage: _GENERAL_DEBUG MSG="string"
#
# If debug enabled, write a string out.
#
# Examples:
# _general_Debug msg="_klicky_status_busy activating the LED STATUS_BUSY"
# _general_Debug msg="FLAG = {FLAG};\nLAST_CHAMBERTEMP = {LAST_CHAMBERTEMP};\nCURRENT_CHAMBERTEMP = {CURRENT_CHAMBERTEMP;"
#
#.................................................................................................................
# Required variable(s) to be set. Add the following to your global variable dictionary block as:
#
# [gcode_macro _USER_VARIABLE]
# variable_respond.debug
#
#.................................................................................................................
# Required external macro(s) used by this macro set.
#
# _USER_VARIABLE
#.................................................................................................................
#.................................................................................................................
#
## URL Resources:
#
#.................................................................................................................
[gcode_macro _general_Debug]
description : Helper: If this call which contains a message on the name of the current routine is placed at the beginning and ending of the current routine then this can be used to determine where an error occurred (which routine the error occurred in) if _USER_VARIABLE respond.debug is set to True
gcode:
{% set message = params.MSG %}
{% set user = printer['gcode_macro _USER_VARIABLE'] %}
{% set debug = user.respond.debug|default(False) %}
{% if debug %}
{ action_respond_info(message) }
{% endif %}