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

Auto-detect FAST device ports #1464

Merged
merged 2 commits into from Nov 26, 2019

Conversation

avanwinkle
Copy link
Collaborator

This PR enables the auto-detection of FAST hardware on serial ports. It's a crude, first-draft implementation, but it seems to work well on my hardware.

This change is to support people who use multiple machines to power their hardware, and/or have multiple USB ports that assign different tty ports to the same device. With the autodetect feature, these people don't have to change their hardware config each time they switch computers or USB ports.

With the ports: autodetect feature, MPF will attempt to find four tty devices with identical, sequential names ending in 0-4 or A-D. If it finds those four, it assumes that the middle two are the FAST Net and RGB devices.

It may not be the most performant approach, but this routine is used only once at bootup so it shouldn't be too bad...

@jabdoa2
Copy link
Collaborator

jabdoa2 commented Nov 26, 2019

Good enough most setups. In more complex scenarios we would have to ID all connected ports to find NET and RGB. For instance my machine has 12 ttyUSB (Nano and two DMDs). But this probably works fine for anybody else.

@jabdoa2 jabdoa2 added this to the 0.53 milestone Nov 26, 2019
@jabdoa2 jabdoa2 merged commit 90870b5 into missionpinball:dev Nov 26, 2019
@avanwinkle avanwinkle deleted the fast-autodetect-ports branch December 4, 2023 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants