|
@@ -387,7 +387,7 @@ static millis_t stepper_inactive_time = (DEFAULT_STEPPER_DEACTIVE_TIME) * 1000UL
|
387
|
387
|
// Buzzer - I2C on the LCD or a BEEPER_PIN
|
388
|
388
|
#if ENABLED(LCD_USE_I2C_BUZZER)
|
389
|
389
|
#define BUZZ(d,f) lcd_buzz(d, f)
|
390
|
|
-#elif HAS_BUZZER
|
|
390
|
+#elif PIN_EXISTS(BEEPER)
|
391
|
391
|
Buzzer buzzer;
|
392
|
392
|
#define BUZZ(d,f) buzzer.tone(d, f)
|
393
|
393
|
#else
|
|
@@ -6717,7 +6717,7 @@ inline void gcode_M503() {
|
6717
|
6717
|
delay(100);
|
6718
|
6718
|
|
6719
|
6719
|
#if HAS_BUZZER
|
6720
|
|
- millis_t next_tick = 0;
|
|
6720
|
+ millis_t next_buzz = 0;
|
6721
|
6721
|
#endif
|
6722
|
6722
|
|
6723
|
6723
|
// Wait for filament insert by user and press button
|
|
@@ -6726,9 +6726,9 @@ inline void gcode_M503() {
|
6726
|
6726
|
while (!lcd_clicked()) {
|
6727
|
6727
|
#if HAS_BUZZER
|
6728
|
6728
|
millis_t ms = millis();
|
6729
|
|
- if (ms >= next_tick) {
|
|
6729
|
+ if (ms >= next_buzz) {
|
6730
|
6730
|
BUZZ(300, 2000);
|
6731
|
|
- next_tick = ms + 2500; // Beep every 2.5s while waiting
|
|
6731
|
+ next_buzz = ms + 2500; // Beep every 2.5s while waiting
|
6732
|
6732
|
}
|
6733
|
6733
|
#endif
|
6734
|
6734
|
idle(true);
|
|
@@ -8858,6 +8858,7 @@ void prepare_move_to_destination() {
|
8858
|
8858
|
|
8859
|
8859
|
float mm_of_travel = HYPOT(angular_travel * radius, fabs(linear_travel));
|
8860
|
8860
|
if (mm_of_travel < 0.001) return;
|
|
8861
|
+
|
8861
|
8862
|
uint16_t segments = floor(mm_of_travel / (MM_PER_ARC_SEGMENT));
|
8862
|
8863
|
if (segments == 0) segments = 1;
|
8863
|
8864
|
|
|
@@ -9428,7 +9429,7 @@ void idle(
|
9428
|
9429
|
print_job_timer.tick();
|
9429
|
9430
|
#endif
|
9430
|
9431
|
|
9431
|
|
- #if HAS_BUZZER && PIN_EXISTS(BEEPER)
|
|
9432
|
+ #if HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER)
|
9432
|
9433
|
buzzer.tick();
|
9433
|
9434
|
#endif
|
9434
|
9435
|
}
|