-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
Long "buzzes" block Marlin #3913
Comments
Are you using the latest |
1.1.0-RC6 #define SPEAKER I can actually hear something |
The buzzer is a blocking function which means it will block anything other than the ISR while is "buzzing", so you should keep it short. |
I would not close this, but call it a bug. |
It's not a big nor a feature.. who want a buzzer buzzing for 2S ?.. |
Not me, not you, but maybe someone else wants to piss someone off :) |
@maukcc
If you have a new, good idea this is welcome. Otherwise, for now, we have to live with what we have. |
After looking into it, I have a way to improve it.. We could _refactor the code into an object_™ and get rid of all the But (is) it worth the effort ? |
@jbrazio Any solution that works in the background is going to add overhead in most loop cycles. The LCD update only happens 100 times a second, so this might be the best place to have something like: if (buzzer_off_ms && ELAPSED(millis(), buzzer_off_ms)) turn_off_buzzer(); …of course that doesn't work for multiple beeps in a row. |
A problem I can see is that when you want to run GCode that plays tones, you need to delay after each GCode to allow the tone to complete. So our other alternative is to make a simple tone queue and have all beeps, buzzes, and tones go into the queue – frequency and duration. I don't see any other alternative, if we want to eliminate the use of |
@thinkyhead I have something cooking already, we will build upon it.
|
@thinkyhead Do you know any boards who use the Marlin's |
@jbrazio I don't know which specific models use a single-tone buzzer rather than a multi-tonal piezo |
OK I will rename the thing.. because "speaker" is far away from a "piezo buzzer", @thinkyhead do you agree with:
|
I think this should be left as-is. We settled on |
I understand your rationale, and thank you for the visual aids. Of course we all know it's a Piezo. The reasoning for the word |
You're right, there are no questions about it but from a user standpoint it might be difficult to differentiate because [I believe], at least for a non native speaker, this is one of those cases where the "common word" does not coincide with the "technical definition", the visual queues was just to show what people associate with which word in a generic way. |
So far we have had no complaints about this particular setting being confusing. |
As far as i know almost all boards use buzzers (with own resonator) and almost no board uses a speaker (without resonator). Most buzzers can be (mis)used as a speaker, but what you can hear is somewhat unpredictable. So the safe way, for us, to get a high audible tone is to not define speaker by default. If someone is annoyed by to much noise he can change the config. @jbrazio Let's see if we can eliminate the busy waiting.
Setting a pin to low for stopping a tone from a buzzer is possible in idle(). Duration is much less critical than frequency. I'm writing to slow. :-( Or do i think and investigate to much? :-) Just tried an acoustic idle time fedback - funny! |
I said I was not insisting on it, will just update to be non-blocking. |
Non-blocking tones will be a cool addition. Looking forward to the "tone buffer" … soon? |
It already plays the Imperial March but requires polishing, expect the PR this weekend. |
Aren't we the good guys? I don't think we should be playing tunes from the Dark Side! |
M300 S0 P1
M300 S698 P300
M300 S0 P50
M300 S523 P50
M300 S0 P25
M300 S494 P50
M300 S0 P25
M300 S523 P100
M300 S0 P50
M300 S554 P300
M300 S0 P100
M300 S523 P300
M300 S0 P400
M300 S659 P300
M300 S0 P100
M300 S698 P300 |
Welcome to the dark side. |
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. |
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
affects the duration it takes from the time you click the jog-dial to a reaction of the menu.So if I set the time to 2000 it takes 2 sec to go into the menu (and all other clicks) scrolling is not affected.
I thought this was only to set the duration of sounds.
The text was updated successfully, but these errors were encountered: