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

Fixes for USB serial on Linux #99

Open
wants to merge 2 commits into
base: v2.0-beta-feature-branch
Choose a base branch
from

Conversation

SafariMonkey
Copy link

Description

Fixes to make serial run on Linux:

  • Allow "/dev/tty" as an alternate prefix to COM for serial source detection
  • Don't try to set buffer size outside Windows because the function just doesn't exist.

A couple choices I made that I would like a confirmation on, but seemed reasonable:

  • COM is now tested as a prefix, not an "in".
  • I changed from checking the UI input for len < 5 to checking for COM prefix. If leaving off the COM is allowed, the length check could be left in, but I couldn't find anywhere that added COM later.
  • I test /dev/tty as the non-Windows prefix. This is apparently not entirely universal, e.g. see here, but the exceptions listed are all BSDs. /dev/ would catch all those, but also /dev/video* and so webcam hardware would get caught in that too. (I checked, it can capture e.g. the Index cameras, as long as the http prefixing is bypassed for that.) One option if you wanna allow for the cases where auto-detection fails could be to add a toggle or dropdown next to the input box, maybe with a default "auto-detect" that detects most cases. However, I figured I'd improve over the current situation and leave anything further to your discretion.

Checklist

  • I accept the CLA.

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.

None yet

1 participant