-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Serial monitor: added check when setting serial port parameters #3420
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
Conversation
This allows to detect for invalid baud rate settings in particular on Linux where the kernel do not allow non-standard baud rates on some devices. See arduino#3389 See arduino#3351
Would you still want to open up the serial monitor when settting the parameters fails? AFAIU the error is shown in the main window, so opening the monitor could mask the error? For completeness, the other setParams call (for doing the 1200baud touch IIRC) should also be checked? |
Well those are GUI considerations:
The widget to change speed is displayed within the serial monitor window, if we keep the serial monitor closed the user has no way to change the speed again to a supported value and it's basically stuck.
Yes and it may be covered by the serial monitor window, not exactly the best, but in my test it worked nicely. How can we do otherwise? a possibility is to pop-up a warning in a dialog box, but this is very annoying because forces the user to click the "dismiss" button every time.
Yes I can easily add the check there too, in this case printing the error on the console is fine I guess. |
Oh, good point.
OTOH, how often will you be running into this error? A dialog box sounds acceptable to me. A better alternative would be to show the error in some part of the serial monitor window. The data area probably isn't the right place, that would be confusing. Putting a label or something next to the "autoscroll" checkbox would work, but could get messy quickly. Ideally you'd just have an "error" bar that gets added above the bottom bar (and auto-hides perhaps), but that's probably a lot of work for this small usecase? |
Could someone retrigger the bot? |
I just wanted to try it with the recent master. If it works why not include this simple fix. |
Rebased and merged with ec7cc8c |
This allows to detect for invalid baud rate settings in particular on Linux where the kernel do not allows non-standard baud rates on some devices.
See #3389 #3351