Display device list at the beginning of the firmware update process.
This commit is contained in:
@@ -146,6 +146,7 @@ export class DeviceService {
|
|||||||
let firmwarePathData: TmpFirmware;
|
let firmwarePathData: TmpFirmware;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
this.device.resetDeviceCache();
|
||||||
this.stopPollTimer();
|
this.stopPollTimer();
|
||||||
|
|
||||||
if (args && args.length > 0) {
|
if (args && args.length > 0) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { cloneDeep, isEqual } from 'lodash';
|
import { isEqual } from 'lodash';
|
||||||
import { Device, devices, HID } from 'node-hid';
|
import { Device, devices, HID } from 'node-hid';
|
||||||
import { CommandLineArgs, DeviceConnectionState, LogService } from 'uhk-common';
|
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> {
|
async reenumerate(enumerationMode: EnumerationModes): Promise<void> {
|
||||||
const reenumMode = EnumerationModes[enumerationMode].toString();
|
const reenumMode = EnumerationModes[enumerationMode].toString();
|
||||||
this.logService.debug(`[UhkHidDevice] Start reenumeration, mode: ${reenumMode}`);
|
this.logService.debug(`[UhkHidDevice] Start reenumeration, mode: ${reenumMode}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user