Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Jun 25, 2015

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

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
@matthijskooijman
Copy link
Collaborator

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?

@cmaglie
Copy link
Member Author

cmaglie commented Jun 26, 2015

Well those are GUI considerations:

Would you still want to open up the serial monitor when settting the parameters fails?

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.

AFAIU the error is shown in the main window, so opening the monitor could mask the error?

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.

For completeness, the other setParams call (for doing the 1200baud touch IIRC) should also be checked?

Yes I can easily add the check there too, in this case printing the error on the console is fine I guess.

@matthijskooijman
Copy link
Collaborator

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.

Oh, good point.

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.

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?

@ffissore ffissore self-assigned this Jul 1, 2015
@facchinm facchinm added the Component: IDE Serial monitor Tools > Serial Monitor label Aug 13, 2015
@NicoHood
Copy link
Contributor

Could someone retrigger the bot?

@matthijskooijman
Copy link
Collaborator

@NicoHood, I don't think this PR was changed since the last build? If you want to build this PR on top of git master, @cmaglie will have to rebase it first.

@NicoHood
Copy link
Contributor

I just wanted to try it with the recent master. If it works why not include this simple fix.

@ffissore
Copy link
Contributor

Rebased and merged with ec7cc8c

@ffissore ffissore closed this Oct 29, 2015
@ffissore ffissore added this to the Release 1.6.6 milestone Oct 29, 2015
@cmaglie cmaglie deleted the serial-monitor-fix branch October 29, 2015 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE Serial monitor Tools > Serial Monitor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants