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

Query available devices from Win32_PnPEntity in FirmwareInstaller #259

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

samgaudr
Copy link
Contributor

Issues

Description

Currently, the available devices in FirmwareInstaller are listed by their port name (COM1, COM2..). With those changes, the devices will have the same name as in the device manager (ex: USB-SERIAL CH340 (COM3)).

Types of changes

Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • Requested changes are in a branch
  • Compiled and tested requested changes on target hardware (PC, device)
  • Updated the documentation, if necessary
  • Updated the LICENSES file, if necessary
  • Reviewed the guidelines for contributing to this repository

Further comments

Device are now acquired with a query on Win32_PnPEntity instead of a call to System.IO.Ports.SerialPort.GetPortNames().

Copy link
Collaborator

@XScorpion2 XScorpion2 left a comment

Choose a reason for hiding this comment

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

Needs a small change


public int CompareTo(COMDevice other)
{
int currentNumber = Int32.Parse(Port.Substring(Port.Length - 1));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Com port range is 1-256 which is higher than a single digit so this will not work long term.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PAhzSAG

Copy link
Owner

Choose a reason for hiding this comment

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

Was this ever resolved?

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

Successfully merging this pull request may close these issues.

Identify maxmix devices in firmware installer
3 participants