refactor(usb): Use hid-api instead of lib-usb (#404)
* refactor(usb): Rewrite jump-to-bootloder to node-hid * refactor(usb): Rewrite the whole usb packages to HID-API * refactor(usb): Deleted not valid usb command files * refactor(usb): Deleted not supported usb commands * Remove obsolete script. * Remove obsolete script. * Fix script. * Fix script. * No need to assign the silent property because it has been removed. * This workaround may work on other platforms, but it certainly doesn't work on Linux. It makes some scripts not work, so I'm commenting it out. * Fix bootloader VID and PID.
This commit is contained in:
committed by
László Monda
parent
3cbd3bb5ea
commit
30c74c06d3
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env node
|
||||
let uhk = require('./uhk');
|
||||
const uhk = require('./uhk');
|
||||
const device = uhk.getUhkDevice();
|
||||
|
||||
let programName = process.argv[1];
|
||||
|
||||
@@ -9,7 +10,4 @@ if (process.argv.length !== 3) {
|
||||
}
|
||||
|
||||
let leftBrightnessPercent = process.argv[2] || '';
|
||||
|
||||
uhk.sendUsbPackets([
|
||||
new Buffer([uhk.usbCommands.setLedPwm, +leftBrightnessPercent]),
|
||||
]);
|
||||
device.write(uhk.getTransferData(new Buffer([uhk.usbCommands.setLedPwm, +leftBrightnessPercent])));
|
||||
|
||||
Reference in New Issue
Block a user