Skip to content

Dev QOL - List device ports from sync.py#278

Open
JakeSiegers wants to merge 7 commits intowarped-pinball:mainfrom
JakeSiegers:port-list
Open

Dev QOL - List device ports from sync.py#278
JakeSiegers wants to merge 7 commits intowarped-pinball:mainfrom
JakeSiegers:port-list

Conversation

@JakeSiegers
Copy link
Copy Markdown
Contributor

Description

Real quick change -
Added list option to sync tool to print available ports on your machine

Related Issues

Motivation and Context

Faster to specify the port over using the auto command.
Devices are different across hardware, nice to see them all.

Testing

Run python dev/sync.py list - see a list of ports available

Screenshots (if applicable)

image

Types of Changes

  • Bug fix (non-breaking change to resolve an issue)
  • New feature (non-breaking change to add functionality)
  • Breaking change (alters existing functionality)
  • Documentation update required

Checklist

  • My code follows the project’s style guidelines.
  • I have updated documentation as needed.
  • I have read the CONTRIBUTING.md document.
  • I have added or updated tests.
  • All new and existing tests pass.

Additional Notes

@mullinmax mullinmax added the enhancement New feature or request label Jan 30, 2026
Comment thread dev/sync.py
args = parser.parse_args(argv[1:])

if args.system == "list":
print("\n".join(list_pico_ports()))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JakeSiegers I think this ought to be detect_boards()
list_pico_ports() actually returns a bunch of other stuff on my machine

Image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

totally fair to clean it up or format the output how you like. I'm not sure about your exact workflow here, but I could see how having a list would be helpful if you were using it in a bash script.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes - for whatever reason the auto board detect doesn't currently detect this dev board I have (haven't looked too hard as to why, as it used to work!), and also takes a while to run anyway - I just wanted a quick list of ports.

As a compromise, I've switched the list command to use the detect_boards function & added a ports arg instead for listing all the raw ports.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my dev workflow is to list my device ports - pick the correct usb one and use it in the sync command when pushing code to the board python dev/sync.py sys11 /dev/cu.usbmodem1101

I haven't dev'd on windows, so I haven't seen that long list of ports - I can see that would be useless to guess which one is correct 😵‍💫

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depressingly that's on Linux, I just actually have that much stuff plugged in ha ha.

@mullinmax
Copy link
Copy Markdown
Contributor

@JakeSiegers also as a heads up. #200 has some refactors of the dev scripts in it, I haven't messed with them for a while but there's a potential for merge conflicts when that goes in, probably not for a week or so though.

@JakeSiegers
Copy link
Copy Markdown
Contributor Author

@JakeSiegers also as a heads up. #200 has some refactors of the dev scripts in it, I haven't messed with them for a while but there's a potential for merge conflicts when that goes in, probably not for a week or so though.

I'll look at this and compare to see if there are issues

@JakeSiegers
Copy link
Copy Markdown
Contributor Author

Sorry - busy week didn't get a chance to catch up on this!

This PR also now includes a small bugfix - the write-config parameter was adjusted and default seemed to be incorrectly set, causing the sync function to ignore custom system config overrides for dev - noticed when the wifi wasn't connecting after I pulled all latest repo updates into my branch.

Fix right here -> de9bd93

@mullinmax
Copy link
Copy Markdown
Contributor

@JakeSiegers sorry we're scrambling to get everything ready for the Texas show and I haven't had time to come back to this. It's on my list though!

@mullinmax
Copy link
Copy Markdown
Contributor

@JakeSiegers OK so I see why this is useful, but I think I want to keep sync focused on orchestrating / flashing how about we put this feature in detect boards? I'll open a PR with what I'm thinking and you let me know if it fits your needs.

@mullinmax
Copy link
Copy Markdown
Contributor

@JakeSiegers Could you give the changes in #333 a try? I think it might be something that works better for you and I and @paulmullin.
We're all developing on different operating systems so this flashing pipeline is just going to be a little messy ha ha.

@JakeSiegers
Copy link
Copy Markdown
Contributor Author

@JakeSiegers Could you give the changes in #333 a try? I think it might be something that works better for you and I and @paulmullin.

We're all developing on different operating systems so this flashing pipeline is just going to be a little messy ha ha.

Yeah, I'll take a look shortly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants