refactor: use Buffer.from and Buffer.alloc instead of new Buffer() (#957)
This commit is contained in:
committed by
László Monda
parent
999feea488
commit
82c9126d82
@@ -6,7 +6,7 @@ let counter = 1;
|
||||
|
||||
while (true) {
|
||||
console.log(`hidapi sync test ${counter++}`);
|
||||
const sendData = new Buffer([uhk.usbCommands.getDeviceProperty, uhk.devicePropertyIds.configSizes]);
|
||||
const sendData = Buffer.from([uhk.usbCommands.getDeviceProperty, uhk.devicePropertyIds.configSizes]);
|
||||
device.write(uhk.getTransferData(sendData));
|
||||
device.readSync()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user