arvydas / blinkstick-ruby

BlinkStick Ruby interface to control devices connected to the computer.
Other
13 stars 9 forks source link

Unable to set mode in BlinkstickPro #6

Open sdalu opened 7 years ago

sdalu commented 7 years ago

There is no method to set mode, and stealing code from python ( self._usb_ctrl_transfer(0x20, 0x9, 0x0004, 0, control_string)) doesn't seem to do the trick

    @handle.control_transfer :bmRequestType => 0x20,
                             :bRequest      => 0x09,
                             :wValue        => 0x0004,
                             :wIndex        => 0,
                             :dataOut       => [4, mode].pack('c*')