Skip to content

Commit c40af0c

Browse files
committed
M300 set 3.5s duration limit
1 parent 9fb034a commit c40af0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Firmware/Marlin_main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6515,11 +6515,11 @@ void process_commands()
65156515
65166516
#### Parameters
65176517
- `S` - frequency in Hz. Not all firmware versions support this parameter
6518-
- `P` - duration in milliseconds
6518+
- `P` - duration in milliseconds max 3500ms
65196519
*/
65206520
case 300: // M300
65216521
{
6522-
uint16_t beepP = code_seen('P') ? code_value() : 1000;
6522+
uint16_t beepP = code_seen('P') ? min(code_value(), 3500) : 1000;
65236523
uint16_t beepS;
65246524
if (!code_seen('S'))
65256525
beepS = 0;

0 commit comments

Comments
 (0)