mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 12:04:19 +00:00
-disalbe beeper if BEEPER_PIN = -1
This commit is contained in:
parent
13e2ad2831
commit
5edef148fe
@ -130,13 +130,16 @@ void beep()
|
||||
{
|
||||
//return;
|
||||
#ifdef ULTIPANEL
|
||||
pinMode(BEEPER,OUTPUT);
|
||||
for(int8_t i=0;i<20;i++){
|
||||
WRITE(BEEPER,HIGH);
|
||||
delay(5);
|
||||
WRITE(BEEPER,LOW);
|
||||
delay(5);
|
||||
}
|
||||
if (BEEPER > -1)
|
||||
{
|
||||
pinMode(BEEPER,OUTPUT);
|
||||
for(int8_t i=0;i<20;i++){
|
||||
WRITE(BEEPER,HIGH);
|
||||
delay(5);
|
||||
WRITE(BEEPER,LOW);
|
||||
delay(5);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -144,13 +147,16 @@ void beepshort()
|
||||
{
|
||||
//return;
|
||||
#ifdef ULTIPANEL
|
||||
pinMode(BEEPER,OUTPUT);
|
||||
for(int8_t i=0;i<10;i++){
|
||||
WRITE(BEEPER,HIGH);
|
||||
delay(3);
|
||||
WRITE(BEEPER,LOW);
|
||||
delay(3);
|
||||
}
|
||||
if (BEEPER > -1)
|
||||
{
|
||||
pinMode(BEEPER,OUTPUT);
|
||||
for(int8_t i=0;i<10;i++){
|
||||
WRITE(BEEPER,HIGH);
|
||||
delay(3);
|
||||
WRITE(BEEPER,LOW);
|
||||
delay(3);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user