Skip to content

Conversation

@bessman
Copy link
Collaborator

@bessman bessman commented Feb 28, 2021

This changes the behavior of auto connect when more than one PSLab is detected. Previously, the device which appeared first in port enumeration would be connected to. Now, SerialHandler will raise an exception, list detected devices, and ask the user to explicitly choose which device they want to connect to.

Also adds a new function, pslab.serial_handler.detect, which returns a dictionary of port names where PSLabs were detected and their version numbers, e.g:

{'/dev/ttyUSB3': 'PSLab V6\n', '/dev/ttyACM3': 'PSLab V5\n'}

If only a single device is detected, auto connect works the same as before.

@bessman bessman changed the title Support multiple devices (fix #170) Support multiple devices (closes #170) Feb 28, 2021
@bessman bessman mentioned this pull request Feb 28, 2021
@bessman bessman merged commit 5cbce91 into fossasia:development Mar 4, 2021
@bessman bessman deleted the multi_connect branch February 20, 2025 09:38
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.

1 participant