Skip to content

Commit

Permalink
M300 set 4s duration limit
Browse files Browse the repository at this point in the history
  • Loading branch information
3d-gussner committed Feb 11, 2025
1 parent e80c9fa commit 9267193
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Firmware/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6515,11 +6515,11 @@ void process_commands()
#### Parameters
- `S` - frequency in Hz. Not all firmware versions support this parameter
- `P` - duration in milliseconds
- `P` - duration in milliseconds max 4000ms or 4 seconds
*/
case 300: // M300
{
uint16_t beepP = code_seen('P') ? code_value() : 1000;
uint16_t beepP = code_seen('P') ? min(code_value(), 4000) : 1000;
uint16_t beepS;
if (!code_seen('S'))
beepS = 0;
Expand Down

0 comments on commit 9267193

Please sign in to comment.