Skip to content

Usage with go-streamdeck under windows - a fix I do not understand #30

@RudolfVonKrugstein

Description

@RudolfVonKrugstein

Hi,

I am trying to use go-streamdeck, which internal uses karalabe/hid.

Its a library to control the elgato Stream Deck.

It works under linux, but fails under windows with:

panic: hidapi: Falscher Parameter.

Which is german for "wrong Parameter".

Without known much about USB, and HID: At one point tried the following:

I removed the windows specificas in these lines:

        if runtime.GOOS == "windows" {
		report = append([]byte{0x00}, b...)
	} else {
		report = b
	}

with

    report = b

At these lines: https://github.com/karalabe/hid/blob/master/hid_enabled.go#L167

Now it works!

I have no Idea why.

Should this be fixed? Or is my device strange?
What would be a good way to write a patch so I can used the unmodifed HID library?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions