c_evening_daylight.cfg modified - 19/04/25 - 23:50:43

This commit is contained in:
pi committed 2025-04-19 23:50:46 +10:00
1 parent ec3d58b26b
commit 3a7432721f
1 file changed
+15 -8
@@ -1,6 +1,6 @@
[real_time]
[gcode_macro EVENING_DAYLIGHT]
[gcode_macro SMART_DAYLIGHT]
variable_last_brightness: -1.0
gcode:
{% set hour = printer["real_time"].hour %}
@@ -47,11 +47,18 @@ gcode:
RESPOND MSG="{fade_msg}"
{% endif %}
[gcode_macro SMART_DAYLIGHT]
description: Run EVENING_DAYLIGHT only if timelapse or hyperlapse is active
[gcode_macro START_SMART_DAYLIGHT]
gcode:
{% set timelapse = printer["gcode_macro TIMELAPSE_TAKE_FRAME"].enable|default(false) %}
{% set hyperlapse = printer["gcode_macro HYPERLAPSE"].run|default(false) %}
{% if timelapse or hyperlapse %}
EVENING_DAYLIGHT
{% endif %}
UPDATE_DELAYED_GCODE ID=SMART_DAYLIGHT_LOOP DURATION=1
RESPOND MSG="🌞 SMART_DAYLIGHT started"
[gcode_macro STOP_SMART_DAYLIGHT]
gcode:
UPDATE_DELAYED_GCODE ID=SMART_DAYLIGHT_LOOP DURATION=0
RESPOND MSG="🛑 SMART_DAYLIGHT stopped"
[delayed_gcode SMART_DAYLIGHT_LOOP]
initial_duration: 5
gcode:
SMART_DAYLIGHT
UPDATE_DELAYED_GCODE ID=SMART_DAYLIGHT_LOOP DURATION=30