sammcj / ender-configs

Ender Printer Configuration, Scripts and Notes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

implement a logarithmic scale for volume

github-actions opened this issue · comments

Line: 15

# Use a 10ms duration is P is omitted.
{% set P = params.P|default(100)|int %}
# Use a 25% volume if V is omitted.
# TODO: implement a logarithmic scale for volume
{% set V = params.V|default(25)|int %}
SET_PIN PIN=beeper VALUE={0.1 * (V / 100) if S > 0 else 1} CYCLE_TIME={ 1.0 / S if S > 0 else 1 }
G4 P{P}
SET_PIN PIN=beeper VALUE=0 CYCLE_TIME={ 0.001 }
[gcode_macro NOTE]
description: