From 9925ac0a10f635871d97cecc89081fd091e49c13 Mon Sep 17 00:00:00 2001 From: Bjoern Kerler Date: Mon, 15 Jan 2024 18:45:07 +0100 Subject: [PATCH] Fix buzzer issue by adding a wait for play time --- src/marlin_stubs/M300.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/marlin_stubs/M300.cpp b/src/marlin_stubs/M300.cpp index a71a76e1b5..e4f70e7bac 100644 --- a/src/marlin_stubs/M300.cpp +++ b/src/marlin_stubs/M300.cpp @@ -4,6 +4,7 @@ #include "../common/sound.hpp" #include "PrusaGcodeSuite.hpp" #include "../../lib/Marlin/Marlin/src/gcode/parser.h" +#include "../lib/Marlin/Marlin/src/gcode/gcode.h" /** \addtogroup G-Codes * @{ @@ -25,6 +26,7 @@ void PrusaGcodeSuite::M300() { // Limits the tone duration to 0-5 seconds. NOMORE(duration, 5000U); Sound::getInstance().singleSound(frequency, duration, volume); + GcodeSuite::dwell(duration); } /** @}*/