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

[FEATURE] Set port in project.pros #223

Closed
karmanyaahm opened this issue Aug 20, 2022 · 4 comments
Closed

[FEATURE] Set port in project.pros #223

karmanyaahm opened this issue Aug 20, 2022 · 4 comments
Labels
p: normal Normal priority

Comments

@karmanyaahm
Copy link

Expected Behavior:

There are options to set the system and user ports in the project file to custom (not autodetected) locations. I want to set them to virtual (./virtualcom0 or 1) non-USB ports.

Actual Behavior:

There don't seem to be any documented options? I looked through the code and couldn't find anything?

System information:

Operating System: Arch Linux
PROS Version: v3.3.3 from git

@BennyBot
Copy link
Member

BennyBot commented Aug 20, 2022

For now, you can use a specific port by passing an option when you call the upload command.
pros upload --port="specific-port"
You should be able to see which ports are connected to a brain through the command pros ls-usb.
Let me know if that doesn’t work, because I am unfamiliar with the behavior through virtual ports. I don’t see why it wouldn’t work though.

I will look at getting this added to the upload_options in project.pros, but it may take some time as we are busy with VSCode updates.

@karmanyaahm
Copy link
Author

pros lsusb doesn't work on virtual serial ports*. Though pros upload --port= works, thanks. However, it's extra typing every time (or I'll have to make aliases).

Another workaround I'm using right now is adding this

ports += [ListPortInfo('./virtualVEXUser', skip_link_detection=True), ListPortInfo('./virtualVEXSystem',skip_link_detection=True)]

to

@lru_cache()
def list_all_comports():
ports = list_ports.comports()
logger(__name__).debug('Connected: {}'.format(';'.join([str(p.__dict__) for p in ports])))
return ports

*I'm making these using socat with socat -d -d TCP:robo-orangepi:10000,forever pty,link=./virtualVEXSystem,wait-slave (I'll publish more info once I finish my project)

@BennyBot
Copy link
Member

Cool. I’ll close this once we get ports added to upload_options.

@karmanyaahm karmanyaahm changed the title [HELP?] Set port in project.pros [FEATURE] Set port in project.pros Aug 20, 2022
@ayushuk ayushuk assigned ayushuk and unassigned ayushuk Oct 18, 2022
@omegaStag omegaStag added the p: normal Normal priority label Jan 13, 2023
@ayushuk
Copy link
Member

ayushuk commented Oct 5, 2023

Completed in #292

@ayushuk ayushuk closed this as completed Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: normal Normal priority
Projects
None yet
Development

No branches or pull requests

4 participants