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

General discussion #1

Open
jitterjames opened this issue Aug 8, 2017 · 20 comments
Open

General discussion #1

jitterjames opened this issue Aug 8, 2017 · 20 comments

Comments

@jitterjames
Copy link
Collaborator

Would it make more sense to all the user to specify the com port when connecting?

@F1uctus
Copy link
Owner

F1uctus commented Aug 8, 2017

I didn't understand you very well. Do you mean add COM port name in "open" action info?

@jitterjames
Copy link
Collaborator Author

Right now you must specify the port to use in plugin settings only.

I am suggesting we have a parameter in the Serial.Open action which specifies which port to open.

The user might want to talk to more than one device.

Also if possible it would be good to connect to first active port when the port is not specified.

@F1uctus
Copy link
Owner

F1uctus commented Aug 8, 2017

OK, now I understand. Will add this.

@jitterjames
Copy link
Collaborator Author

jitterjames commented Aug 8, 2017 via email

@F1uctus
Copy link
Owner

F1uctus commented Aug 8, 2017

It means, that we need to specify port name in all actions.
So it might be better if we create action "Serial.Select", that will select port from opened ports, and after this, user will work with selected port.

Or, "Serial.SelectNew", that will either select port if it exists, or create new if it's not. (Like RoboB action)

@jitterjames
Copy link
Collaborator Author

jitterjames commented Aug 8, 2017 via email

@F1uctus
Copy link
Owner

F1uctus commented Aug 8, 2017

Yes, serial.open action anyway works before doAction switch, when port already connected, it "doing nothing".

@F1uctus
Copy link
Owner

F1uctus commented Aug 9, 2017

I almost rebuilt logic for connecting to countless ports.
Now user can"Select" port, then actions "write", "upload" and "close" will work with selected port.
Also in "Select" action second option is "Auto-scan Arduino".

In "open" action user need to specify three options: port name, bauds rate and DTR signal activity.
These three options was removed from plugin settings window.

Also I added action "GetPorts" that moves list of ports to LastResult.
This action have two options: "Only Opened ports" and "Friendly port names".

And I think I can add list of all and list of opened ports in plugin settings window.

So this 'll be another BIG update!

@jitterjames
Copy link
Collaborator Author

jitterjames commented Aug 9, 2017 via email

@F1uctus
Copy link
Owner

F1uctus commented Aug 10, 2017

Committed update. Tested it, errors not found, but it would be better if another people test it too.

@jitterjames
Copy link
Collaborator Author

jitterjames commented Aug 13, 2017

Take a look at the class "util.cs". (for info only)

It shows how to get non-arduino serial port info.
using (ManagementObjectCollection Ports = new ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_PnPEntity WHERE ClassGuid="{4d36e978-e325-11ce-bfc1-08002be10318}"").Get())

From there we need to decide based on name. I was thinking we take anything that does not match "Communications Port" since this is usually not connected to anything.

A better option might be to let the user specify the port to open by a sub-match (string.contains() or maybe using a regular expression pattern) of the name/description.

So they could open either "COM6" or they could open using "Prolific" or "Mega 2560" etc. I think this would be the most powerful/easy/flexible, especially if they want to target a specific device even if the port # has changed around after being plugged into a different USB port etc.

We could also use the ManagementObjectCollection above when showing available ports on the plugin settings page to provide more information than just the port number. We could show name, and maybe other info if useful.

@F1uctus
Copy link
Owner

F1uctus commented Aug 13, 2017

For me "Communications Port" shows as "Последовательный порт", so this "tag" depends on OS language.
But opening port by substring is realy powerful, I'm working on it now.

@jitterjames
Copy link
Collaborator Author

jitterjames commented Aug 13, 2017 via email

@F1uctus
Copy link
Owner

F1uctus commented Aug 13, 2017

Probably yes. If I'll have free time I'll modify code and it will be ready tomorrow.

@F1uctus
Copy link
Owner

F1uctus commented Aug 14, 2017

Update ready. Merged Open and Select actions, now port opening by RegEx pattern. Updated GetPorts action.

@jitterjames
Copy link
Collaborator Author

jitterjames commented Aug 14, 2017 via email

@F1uctus
Copy link
Owner

F1uctus commented Aug 29, 2017

I made a full-ready release, think we can add it to VC package.
If we can, Need I delete old dll from vc forum plugin topic?

@F1uctus F1uctus changed the title com port General discussion Aug 29, 2017
@jitterjames
Copy link
Collaborator Author

jitterjames commented Aug 29, 2017 via email

@F1uctus
Copy link
Owner

F1uctus commented Sep 17, 2017

I released 1.0.4.5 version, with highlighting current opened port in plugin window,
And also some bugfixes with getports.
In next release I'm planning to implement LPT (printer) port and modem port connection.

I thought that it is not comfortable to use "open / select" in 1 action, because in modem connection I need to add more options to "open" action.
It's late to separate actions, or not?

@jitterjames
Copy link
Collaborator Author

jitterjames commented Sep 17, 2017 via email

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

No branches or pull requests

2 participants