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
@@ -13,7 +13,7 @@ function getUint16(buffer, offset) {
|
||||
let prevGeneric, prevBasic, prevMedia, prevSystem, prevMouse;
|
||||
function getDebugInfo() {
|
||||
|
||||
const payload = new Buffer([uhk.usbCommands.getDebugBuffer]);
|
||||
const payload = Buffer.from([uhk.usbCommands.getDebugBuffer]);
|
||||
// console.log(payload)
|
||||
// console.log('Sending ', uhk.bufferToString(payload));
|
||||
device.write(uhk.getTransferData(payload));
|
||||
|
||||
Reference in New Issue
Block a user