Dev QOL - List device ports from sync.py#278
Dev QOL - List device ports from sync.py#278JakeSiegers wants to merge 7 commits intowarped-pinball:mainfrom
Conversation
| args = parser.parse_args(argv[1:]) | ||
|
|
||
| if args.system == "list": | ||
| print("\n".join(list_pico_ports())) |
There was a problem hiding this comment.
@JakeSiegers I think this ought to be detect_boards()
list_pico_ports() actually returns a bunch of other stuff on my machine
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 😵💫
There was a problem hiding this comment.
Depressingly that's on Linux, I just actually have that much stuff plugged in ha ha.
|
@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 |
|
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 |
|
@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! |
|
@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. |
|
@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. |
Yeah, I'll take a look shortly |
Description
Real quick change -
Added
listoption to sync tool to print available ports on your machineRelated Issues
Motivation and Context
Faster to specify the port over using the
autocommand.Devices are different across hardware, nice to see them all.
Testing
Run
python dev/sync.py list- see a list of ports availableScreenshots (if applicable)
Types of Changes
Checklist
Additional Notes