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
@@ -15,7 +15,7 @@ function convertMs(milliseconds) {
|
||||
return {days, hours, minutes, seconds};
|
||||
}
|
||||
|
||||
let buffer = new Buffer([uhk.usbCommands.getDeviceProperty, uhk.devicePropertyIds.uptime]);
|
||||
let buffer = Buffer.from([uhk.usbCommands.getDeviceProperty, uhk.devicePropertyIds.uptime]);
|
||||
//console.log(buffer);
|
||||
device.write(uhk.getTransferData(buffer));
|
||||
let response = device.readSync();
|
||||
|
||||
Reference in New Issue
Block a user