Bläddra i källkod

Make proper distinction between BEEPER and HAS_BUZZER

Scott Lahteine 10 år sedan
förälder
incheckning
2460f82d8b
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1
    1
      Marlin/buzzer.cpp

+ 1
- 1
Marlin/buzzer.cpp Visa fil

@@ -7,7 +7,7 @@
7 7
     if (freq > 0) {
8 8
       #if ENABLED(LCD_USE_I2C_BUZZER)
9 9
         lcd_buzz(duration, freq);
10
-      #elif HAS_BUZZER // on-board buzzers have no further condition
10
+      #elif defined(BEEPER) && BEEPER >= 0 // on-board buzzers have no further condition
11 11
         SET_OUTPUT(BEEPER);
12 12
         #ifdef SPEAKER // a speaker needs a AC ore a pulsed DC
13 13
           //tone(BEEPER, freq, duration); // needs a PWMable pin

Laddar…
Avbryt
Spara