-disalbe beeper if BEEPER_PIN = -1

This commit is contained in:
Christian Thalhammer 2012-02-06 12:10:32 +01:00
parent 13e2ad2831
commit 5edef148fe

View File

@ -130,6 +130,8 @@ void beep()
{
//return;
#ifdef ULTIPANEL
if (BEEPER > -1)
{
pinMode(BEEPER,OUTPUT);
for(int8_t i=0;i<20;i++){
WRITE(BEEPER,HIGH);
@ -137,6 +139,7 @@ void beep()
WRITE(BEEPER,LOW);
delay(5);
}
}
#endif
}
@ -144,6 +147,8 @@ void beepshort()
{
//return;
#ifdef ULTIPANEL
if (BEEPER > -1)
{
pinMode(BEEPER,OUTPUT);
for(int8_t i=0;i<10;i++){
WRITE(BEEPER,HIGH);
@ -151,6 +156,7 @@ void beepshort()
WRITE(BEEPER,LOW);
delay(3);
}
}
#endif
}