From 1f634f98f3177e7ca975387629c27e16a90e97ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ro=CC=81bert=20Kiss?= Date: Mon, 30 Oct 2017 20:35:41 +0100 Subject: [PATCH] fix(usb): remove extra first 0 from USB transfer data --- packages/uhk-usb/src/uhk-hid-device.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/uhk-usb/src/uhk-hid-device.ts b/packages/uhk-usb/src/uhk-hid-device.ts index 2826d49b..3613a9db 100644 --- a/packages/uhk-usb/src/uhk-hid-device.ts +++ b/packages/uhk-usb/src/uhk-hid-device.ts @@ -54,9 +54,9 @@ export class UhkHidDevice { const data = UhkHidDevice.convertBufferToIntArray(buffer); // if data start with 0 need to add additional leading zero because HID API remove it. // https://github.com/node-hid/node-hid/issues/187 - if (data.length > 0 && data[0] === 0 && process.platform === 'win32') { - data.unshift(0); - } + // if (data.length > 0 && data[0] === 0 && process.platform === 'win32') { + // data.unshift(0); + // } // From HID API documentation: // http://www.signal11.us/oss/hidapi/hidapi/doxygen/html/group__API.html#gad14ea48e440cf5066df87cc6488493af