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

Filter out .tty serial ports in Networking Widget Serial list #1097

Closed
retiutut opened this issue Jan 6, 2023 · 3 comments
Closed

Filter out .tty serial ports in Networking Widget Serial list #1097

retiutut opened this issue Jan 6, 2023 · 3 comments

Comments

@retiutut
Copy link
Member

retiutut commented Jan 6, 2023

Problem

Sometimes the list is too long, and Arduino IDE does this by default. This will make it much easier for new users to control an Arduino using the GUI. Users may still need to scroll, but this will reduce the number of items by half for all Mac users.

Expected

Shorten the list to only include .cu instead of .tty addresses.

Extra credit for updating the list any time the dropdown is opened.

Operating System and Version

Mac

GUI Version

5.1.1-alpha.0

Running standalone app

Both

Type of OpenBCI Board

N/A

Are you using a WiFi Shield?

N/A

Console Log

Screen Shot 2023-01-06 at 3 14 39 PM

@kkashiva
Copy link
Contributor

kkashiva commented May 16, 2023

Hi @retiutut I'd like to contribute to this as my first issue.
My approach is: In W_Networking.pde, filter the comPorts ArrayList to only include .cu instead of .tty addresses, so that when the method createPortDropdown is called, only the filtered comPorts list is passed as argument.

Slight confusion on what the role of cp5_networking_portName is here, if you can guide me please?

@retiutut
Copy link
Member Author

retiutut commented May 16, 2023

private LinkedList<String> getCytonComPorts() {

I would use the third party serial port library that's used in this method. We do want to see other ports besides the Cyton dongle though. But this method could be reworked to provide the solution with the output as a LinkedList.

cp5_networking_portname is a Cp5 instance that holds the dropdown object for the port names.

To complete this issue, simply make the new method and call the updated method to be stored here:

comPorts = new ArrayList<String>(Arrays.asList(processing.serial.Serial.list()));

This list then gets fed to the dropdown, and the values appear there.

Also, please make changes in a feature branch based off of development.

Hope this helps,
RW

@kkashiva
Copy link
Contributor

Thank you for the guidance @retiutut that was helpful. Please review the pull request created here #1136 (comment)

retiutut added a commit that referenced this issue Jun 6, 2023
Filter .tty serial ports in Networking for Mac users (Issue #1097)
@retiutut retiutut closed this as completed Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants