Merge pull request #3542 from wavexx/default_beep_freq_2

M300: do not set a default frequency if S is not set
This commit is contained in:
Alex Voinea 2022-07-12 20:39:31 +03:00 committed by GitHub
commit 39dfa96167
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7595,18 +7595,12 @@ Sigma_Exit:
*/ */
case 300: // M300 case 300: // M300
{ {
uint16_t beepS = code_seen('S') ? code_value() : 110; uint16_t beepS = code_seen('S') ? code_value() : 0;
uint16_t beepP = code_seen('P') ? code_value() : 1000; uint16_t beepP = code_seen('P') ? code_value() : 1000;
if (beepS > 0) #if BEEPER > 0
{ if (beepP > 0)
#if BEEPER > 0 Sound_MakeCustom(beepP,beepS,false);
Sound_MakeCustom(beepP,beepS,false); #endif
#endif
}
else
{
_delay(beepP);
}
} }
break; break;
#endif // M300 #endif // M300