chore(kboot): add more logging (#1008)
* chore(kboot): add more logging * fix: add uncaughtException handler * fix: wait to prevent race condition * fix: don't close device after success left keyboard connection * revert: remove extra delay * revert: add back the waiting * fix: always initialize new KBoot instance when try to configure I2C * fix: increase the wait time between 2 IC2 reconnection * fix: timing and usb reconnection * fix: dont close kboot device * feat: append the WithKboot to the firmware upgrade methods * feat: revert back the blhost functionality
This commit is contained in:
committed by
László Monda
parent
8a7f30dbb1
commit
b53751b408
@@ -7,9 +7,18 @@ const rootDir = path.join(__dirname, '../../tmp');
|
||||
const uhkHidDevice = new UhkHidDevice(logService, {}, rootDir);
|
||||
const uhkOperations = new UhkOperations(logService, uhkHidDevice, rootDir);
|
||||
|
||||
process.on('uncaughtException', error => {
|
||||
console.error('uncaughtException', error);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
process.on('unhandledRejection', (reason: any, promise: Promise<any>): void => {
|
||||
console.error('unhandledRejection', { reason, promise });
|
||||
});
|
||||
|
||||
uhkOperations
|
||||
.updateRightFirmware()
|
||||
.then(() => uhkOperations.updateLeftModule())
|
||||
.updateRightFirmwareWithKboot()
|
||||
.then(() => uhkOperations.updateLeftModuleWithKboot())
|
||||
.then(() => console.log('Firmware upgrade finished'))
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
|
||||
Reference in New Issue
Block a user