c_evening_daylight.cfg modified - 19/04/25 - 10:13:53

This commit is contained in:
pi committed 2025-04-19 10:13:57 +10:00
1 parent eeb43b8833
commit f9b2d30ef1
1 file changed
+2 -2
@@ -6,11 +6,11 @@ timeout: 0.3
initial_duration: 0.25
gcode:
{% set output = printer["gcode_shell_command GET_TIME"].output %}
{% set debug_msg = "⏱ shell output: " ~ output %}
RESPOND MSG="{debug_msg}"
{% set parts = output.split(" ") %}
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: