Browse Source

tone will end automaticly

AnHardt 10 years ago
parent
commit
f2c94b3298
1 changed files with 1 additions and 3 deletions
  1. 1
    3
      Marlin/ultralcd.cpp

+ 1
- 3
Marlin/ultralcd.cpp View File

1542
   if (freq > 0) {
1542
   if (freq > 0) {
1543
     #if BEEPER > 0
1543
     #if BEEPER > 0
1544
       SET_OUTPUT(BEEPER);
1544
       SET_OUTPUT(BEEPER);
1545
-      tone(BEEPER, freq);
1546
-      delay(duration);
1547
-      noTone(BEEPER);
1545
+      tone(BEEPER, freq, duration);
1548
     #elif defined(LCD_USE_I2C_BUZZER)
1546
     #elif defined(LCD_USE_I2C_BUZZER)
1549
       lcd.buzz(duration,freq);
1547
       lcd.buzz(duration,freq);
1550
     #else
1548
     #else

Loading…
Cancel
Save