Skip to content
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

Adding extra open parameters: dataBits parity stopBits #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sfkristof
Copy link

Hi John!

Please review this mod and tell me if I should change anything.

Thanks,
Kristof

@chilipeppr
Copy link
Collaborator

These changes look great. So just to be sure, you can still open ports the
exact same way you've been able to in the past, so we don't break anything,
but if you also specify parity/etc you have to do all 3 new params for it
to work and it will detect that you're doing those params? Case in point,
you can do an open command and not specify a bufferAlgorithm. So you have 3
args. But if you have 4 args its with buffer. In your changes it looks like
you seek 6 args, but do you also allow bufferAlgorithm as an option still
thus 7 args?

On Tue, Sep 6, 2016 at 7:18 AM, sfkristof [email protected] wrote:

Hi John!

Please review this mod and tell me if I should change anything.

Thanks,

Kristof

You can view, comment on, or merge this pull request online at:

#54
Commit Summary

  • Adding extra open parameters: dataBits parity stopBits

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#54, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AHidbXxeKsvQ7AhTBh0gSR2RiGexlqYPks5qnXZHgaJpZM4J146c
.

@sfkristof
Copy link
Author

Yes I made it to be backward compatible so if you give just the port baud and optionally the bufferAlgorythm it works as it did in the past and if there are more than 3 params it assumes this new open mode with the 3 extra obligatory parameter like this:
open [bufferAlgorythm]

@sfkristof
Copy link
Author

Ooops the less greater then characters are lost.
So the 2nd syntax looks like this:
open port baud databits parity stopbits bufferAlg (optional)
databits: usually 7, 8
parity: NONE, ODD, EVEN, MARK, SPACE
stopbits: 1, 1.5, 2
Example:
open COM1 9600 7 ODD 1.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants