c_evening_daylight.cfg modified - 19/04/25 - 10:37:43
This commit is contained in:
1 parent
355a4ec686
commit
2bc562824b
1 file changed
+4
-5
@@ -7,12 +7,10 @@ verbose: False
|
|||||||
gcode:
|
gcode:
|
||||||
RUN_SHELL_COMMAND CMD=GET_TIME
|
RUN_SHELL_COMMAND CMD=GET_TIME
|
||||||
|
|
||||||
[gcode_macro PROCESS_TIME_OUTPUT]
|
[delayed_gcode process_time_output]
|
||||||
|
initial_duration: 0.25
|
||||||
gcode:
|
gcode:
|
||||||
G4 P250 # wait 250ms for shell to complete
|
|
||||||
{% set output = printer["shell_command"].output %}
|
{% set output = printer["shell_command"].output %}
|
||||||
{% set debug_msg = "✅ Shell output: " ~ output %}
|
|
||||||
RESPOND MSG="{debug_msg}"
|
|
||||||
{% set parts = output.split(" ") %}
|
{% set parts = output.split(" ") %}
|
||||||
SET_GCODE_VARIABLE MACRO=TIME_STATE VARIABLE=hour VALUE={parts[0]|int}
|
SET_GCODE_VARIABLE MACRO=TIME_STATE VARIABLE=hour VALUE={parts[0]|int}
|
||||||
SET_GCODE_VARIABLE MACRO=TIME_STATE VARIABLE=minute VALUE={parts[1]|int}
|
SET_GCODE_VARIABLE MACRO=TIME_STATE VARIABLE=minute VALUE={parts[1]|int}
|
||||||
@@ -20,7 +18,8 @@ gcode:
|
|||||||
[gcode_macro CHECK_AND_FADE_LIGHT]
|
[gcode_macro CHECK_AND_FADE_LIGHT]
|
||||||
gcode:
|
gcode:
|
||||||
FETCH_TIME
|
FETCH_TIME
|
||||||
PROCESS_TIME_OUTPUT
|
UPDATE_DELAYED_GCODE ID=process_time_output DURATION=0.25
|
||||||
|
G4 P500
|
||||||
EVENING_DAYLIGHT
|
EVENING_DAYLIGHT
|
||||||
|
|
||||||
[gcode_macro SHOW_LIGHT_TIME]
|
[gcode_macro SHOW_LIGHT_TIME]
|
||||||
|
|||||||
Reference in new issue
Block a user