Skip to content

Support multiple connected devices #1

Description

@danielsiwiec

Hi @tcabanski, currently the module supports only one connected device. Could we have a support for multiple? It could be as simple as:

  constructor(deviceNo) {
    ....
    ....
    this.device = this.findDevice(deviceNo);
    ....
    ....
  }

  findDevice(deviceNo) {
    var devices = hid.devices(this.vendorId, this.productId);
    if (devices !== undefined) {
      return devices[deviceNo || 0];
    }
  }

It wouldn't affect existing consumers of the module, but would allow the new ones to select the device. I'd be happy to submit a pull request for this.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions