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
@@ -4,7 +4,7 @@ const uhk = require('./uhk');
|
||||
|
||||
(async function() {
|
||||
const device = uhk.getUhkDevice();
|
||||
const buffer = new Buffer(Array(2**15-64).fill(0xff));
|
||||
const buffer = Buffer.from(Array(2**15-64).fill(0xff));
|
||||
await uhk.writeConfig(device, buffer, false);
|
||||
await uhk.launchEepromTransfer(device, uhk.eepromOperations.write, uhk.configBufferIds.stagingUserConfig);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user