Display device list at the beginning of the firmware update process.

This commit is contained in:
László Monda
2018-05-22 01:53:14 +02:00
parent 0a4d3a002e
commit cdf3caee9e
2 changed files with 6 additions and 1 deletions

View File

@@ -146,6 +146,7 @@ export class DeviceService {
let firmwarePathData: TmpFirmware;
try {
this.device.resetDeviceCache();
this.stopPollTimer();
if (args && args.length > 0) {

View File

@@ -1,4 +1,4 @@
import { cloneDeep, isEqual } from 'lodash';
import { isEqual } from 'lodash';
import { Device, devices, HID } from 'node-hid';
import { CommandLineArgs, DeviceConnectionState, LogService } from 'uhk-common';
@@ -153,6 +153,10 @@ export class UhkHidDevice {
}
}
public resetDeviceCache(): void {
this._prevDevices = {};
}
async reenumerate(enumerationMode: EnumerationModes): Promise<void> {
const reenumMode = EnumerationModes[enumerationMode].toString();
this.logService.debug(`[UhkHidDevice] Start reenumeration, mode: ${reenumMode}`);