Skip to content

Commit

Permalink
Fix buzzer issue by adding a wait for play time
Browse files Browse the repository at this point in the history
  • Loading branch information
bkerler committed Apr 22, 2024
1 parent 0de68b8 commit 9925ac0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/marlin_stubs/M300.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
* @{
Expand All @@ -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);
}

/** @}*/

0 comments on commit 9925ac0

Please sign in to comment.