diff --git a/config/sample-macros.cfg b/config/sample-macros.cfg index 0eb049ac..fcb144e0 100644 --- a/config/sample-macros.cfg +++ b/config/sample-macros.cfg @@ -72,9 +72,7 @@ value: 0 shutdown_value: 0 # Disable at emergency shutdown (no PWM would be available anyway). cycle_time: 0.001 -# PWM frequency : 0.001 = 1ms will give a base tone of 1kHz -scale: 1000 -# PWM parameter will be in the range of (0-1000 Hz). +# Default PWM frequency : 0.001 = 1ms will give a tone of 1kHz # Although not pitch perfect. [gcode_macro M300] @@ -83,7 +81,7 @@ gcode: {% set S = params.S|default(1000)|int %} # Use a 10ms duration is P is omitted. {% set P = params.P|default(100)|int %} - SET_PIN PIN=BEEPER_pin VALUE={S} + SET_PIN PIN=BEEPER_pin VALUE=0.5 CYCLE_TIME={ 1.0/S if S > 0 else 1 } G4 P{P} SET_PIN PIN=BEEPER_pin VALUE=0