From 7937678cb3514ac6d6a34f7a4bf46c73ca533eeb Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 24 Oct 2021 21:41:52 -0400 Subject: [PATCH] config: Remove deprecated features from printer-velleman-k8800-2017.cfg Don't use deprecated default_parameter_x in printer-velleman-k8800-2017.cfg . Signed-off-by: Kevin O'Connor --- config/printer-velleman-k8800-2017.cfg | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/printer-velleman-k8800-2017.cfg b/config/printer-velleman-k8800-2017.cfg index a9a9ff1d..c1a8abe6 100644 --- a/config/printer-velleman-k8800-2017.cfg +++ b/config/printer-velleman-k8800-2017.cfg @@ -120,11 +120,11 @@ pin: PH4 pwm: False [gcode_macro M300] -default_parameter_S: 1000 -# Use a default 1kHz tone if S is omitted. -default_parameter_P: 100 -# # Use a 10ms duration is P is omitted. gcode: - SET_PIN PIN=BEEPER VALUE=50 CYCLE_TIME={ 1/S|float } - G4 P{P} - SET_PIN PIN=BEEPER VALUE=0 + # Use a default 1kHz tone if S is omitted. + {% set S = params.S|default(1000.0)|float %} + # Use a 10ms duration is P is omitted. + {% set P = params.P|default(100)|int %} + SET_PIN PIN=BEEPER VALUE=50 CYCLE_TIME={ 1.0 / S } + G4 P{P} + SET_PIN PIN=BEEPER VALUE=0