-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
At times buzzer continues to Beep #4248
Comments
I suggest this change to - else if (millis() >= this->state.timestamp) this->reset();
+ else if (ELAPSED(millis(), this->state.timestamp)) this->reset(); #define PENDING(NOW,SOON) ((long)(NOW-(SOON))<0)
#define ELAPSED(NOW,SOON) (!PENDING(NOW,SOON)) |
I note that |
Another thing that may help in #if ENABLED(LCD_USE_I2C_BUZZER)
lcd.buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
#elif PIN_EXISTS(BEEPER)
buzzer.tone(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
+ buzzer.tick();
#endif |
Alternatively… the delay in #if ENABLED(LCD_USE_I2C_BUZZER)
lcd.buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
+ delay(10);
#elif PIN_EXISTS(BEEPER)
buzzer.tone(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
+ for (int8_t i=5; i--;) { buzzer.tick(); delay(2); }
#endif |
@lavato is it related with the SD card menu item(s) ? |
@jbrazio @thinkyhead |
Solution in issue #4249 also "fixed" my buzzer problem. However, I still think there is an issue with the way how buzzer code stops the sound, as any delay or "hang" appears to cause this issue. As I said above, I will try thinkyhead's code before closing this. |
For me this worked with the "bad" SD card. Thank you! - else if (millis() >= this->state.timestamp) this->reset();
+ else if (ELAPSED(millis(), this->state.timestamp)) this->reset();
#define PENDING(NOW,SOON) ((long)(NOW-(SOON))<0)
#define ELAPSED(NOW,SOON) (!PENDING(NOW,SOON)) BTW: How do you paste colored code into the comment? |
When making a code block, after the three backticks you can append a file-extension for the language whose highlighting you want.
#define SOME_C_CODE true
if (SOME_C_CODE) {
printf("Hello %s\n", "world!");
} |
@thinkyhead Cheers for that. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
When selecting menu items at times buzzer continues to Beep, the only way to stop it is to press the LCD control button again.
This is prevalent in the SD menu section.
The text was updated successfully, but these errors were encountered: