c_evening_daylight.cfg modified - 19/04/25 - 10:23:21
This commit is contained in:
1 parent
aa8aca4c3d
commit
dc95b3aa4d
1 file changed
+3
-6
@@ -1,16 +1,13 @@
|
|||||||
[gcode_shell_command GET_TIME]
|
[gcode_shell_command GET_TIME]
|
||||||
command: sh /home/pi/printer_data/config/SCRIPTS/get_time.sh
|
command: sh /home/pi/printer_data/config/SCRIPTS/get_time.sh
|
||||||
timeout: 0.3
|
timeout: 0.05
|
||||||
|
verbose: False
|
||||||
|
|
||||||
[delayed_gcode process_time_output]
|
[delayed_gcode process_time_output]
|
||||||
initial_duration: 0.25
|
initial_duration: 0.25
|
||||||
gcode:
|
gcode:
|
||||||
{% set output = printer["gcode_shell_command GET_TIME"].output %}
|
{% set output = printer["gcode_shell_command GET_TIME"].output %}
|
||||||
{% set parts = output.split(" ") %}
|
RESPOND MSG="{output}" # just prints raw output
|
||||||
SET_GCODE_VARIABLE MACRO=EVENING_DAYLIGHT VARIABLE=hour VALUE={parts[0]|int}
|
|
||||||
SET_GCODE_VARIABLE MACRO=EVENING_DAYLIGHT VARIABLE=minute VALUE={parts[1]|int}
|
|
||||||
{% set debug_msg = "⏱ Stored hour=" ~ parts[0]|int|string ~ " min=" ~ parts[1]|int|string %}
|
|
||||||
RESPOND MSG="{debug_msg}"
|
|
||||||
|
|
||||||
[gcode_macro SHOW_LIGHT_TIME]
|
[gcode_macro SHOW_LIGHT_TIME]
|
||||||
gcode:
|
gcode:
|
||||||
|
|||||||
Reference in new issue
Block a user