Skip to content

Check for ports already in use before connecting to serial port#101

Open
01baftb wants to merge 1 commit into
tino:masterfrom
01baftb:master
Open

Check for ports already in use before connecting to serial port#101
01baftb wants to merge 1 commit into
tino:masterfrom
01baftb:master

Conversation

@01baftb

@01baftb 01baftb commented Jan 16, 2021

Copy link
Copy Markdown

Hi, I would like to a propose a possible solution to the previously posted issue #100. I am excited for contributing to an open source project for the first time. Please forgive me if proposed solution is incorrect.

Summary of issue and solution:
If a user tries to open a port that is already in use, then serial.serialutil.SerialException error will occur. To minimize occurrence of this issue, every time a Board() object is created, we should check to see if the port was already opened by pyFirmata previously by using a class attribute, _boards_in_use that keeps track of all serial ports opened by pyFirmata.

@Abhi011999

Copy link
Copy Markdown

I second this PR. Please check and merge.

@YmClash

YmClash commented Apr 9, 2024

Copy link
Copy Markdown

me too pls

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.

3 participants