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,9 +1542,7 @@ void lcd_buzz(long duration, uint16_t freq) {
1542 1542
   if (freq > 0) {
1543 1543
     #if BEEPER > 0
1544 1544
       SET_OUTPUT(BEEPER);
1545
-      tone(BEEPER, freq);
1546
-      delay(duration);
1547
-      noTone(BEEPER);
1545
+      tone(BEEPER, freq, duration);
1548 1546
     #elif defined(LCD_USE_I2C_BUZZER)
1549 1547
       lcd.buzz(duration,freq);
1550 1548
     #else

Loading…
Cancel
Save