mirror of
https://github.com/bassamanator/Sovol-SV06-firmware.git
synced 2025-11-08 13:31:16 +00:00
Pulling in structure from personal branch.
This commit is contained in:
@@ -210,4 +210,19 @@ gcode:
|
||||
gcode:
|
||||
{% if "xyz" not in printer.toolhead.homed_axes %}
|
||||
G28
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro BEEP]
|
||||
description: BEEP I=3 DUR=200 FREQ=2000: Beep 3 times, for 200ms each, at 2kHz frequency.
|
||||
gcode:
|
||||
# Parameters
|
||||
{% set i = params.I|default(1)|int %} ; Iterations (number of times to beep).
|
||||
{% set dur = params.DUR|default(100)|int %} ; Duration/wait of each beep in ms. Default 100ms.
|
||||
{% set freq = params.FREQ|default(2000)|int %} ; Frequency in Hz. Default 2kHz.
|
||||
|
||||
{% for iteration in range(i|int) %}
|
||||
SET_PIN PIN=beeper VALUE=0.8 CYCLE_TIME={ 1.0/freq if freq > 0 else 1 }
|
||||
G4 P{dur}
|
||||
SET_PIN PIN=beeper VALUE=0
|
||||
G4 P{dur}
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user