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

Typo in Odd Parity #1092

Closed
cljones1903 opened this issue Nov 22, 2019 · 4 comments · Fixed by #1094
Closed

Typo in Odd Parity #1092

cljones1903 opened this issue Nov 22, 2019 · 4 comments · Fixed by #1094
Assignees
Labels
bug
Milestone

Comments

@cljones1903
Copy link

@cljones1903 cljones1903 commented Nov 22, 2019

Describe the bug
In the file posix_serial_driver.rb the code reads "cflags |= Termios::PADODD if parity == "ODD" where it should be "PARODD".

To Reproduce
Steps to reproduce the behavior:
Try to set up a serial port with an odd parity

Expected behavior
The serial port to connect.

Screenshots
n/a

Environment (please complete the following information):

  • OS: Linux Ubuntu 18.04 LTS
  • COSMOS Version 4.4.0
@jasonatball

This comment has been minimized.

Copy link
Collaborator

@jasonatball jasonatball commented Nov 22, 2019

We are setting the actual driver code to Termios::PADODD but internally in COSMOS we use the more straightforward (and platform independent) variables of EVEN, ODD, NONE. See serial_driver.rb.

@jasonatball jasonatball self-assigned this Nov 22, 2019
@jasonatball

This comment has been minimized.

Copy link
Collaborator

@jasonatball jasonatball commented Nov 22, 2019

Also see the serial interface documentation: https://cosmosrb.com/docs/interfaces/#serial-interface

@cljones1903

This comment has been minimized.

Copy link
Author

@cljones1903 cljones1903 commented Nov 24, 2019

When I set the parity to "ODD" in the server configuration file. It would throw an error when I tried to run the sever. The error was something along the lines of "cflags |= Termios::PADODD: error, not found. Did you mean PARODD".

I can find the exact wording when I get back to the office next week. But the serial interface would not connect until I changed the text to "PARODD". Once I did that, it worked perfectly.

@jasonatball jasonatball added bug and removed question labels Nov 25, 2019
@jasonatball

This comment has been minimized.

Copy link
Collaborator

@jasonatball jasonatball commented Nov 25, 2019

@cljones1903 Sorry I didn't understand the issue. This is definitely a bug. Thanks for the report1

@ryanmelt ryanmelt added this to the v4.4.1 milestone Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.