feat: show firmware version of the device/modules on firmware page (#589)

This commit is contained in:
Róbert Kiss
2018-03-23 07:10:02 +01:00
committed by László Monda
parent 2f00a5eaf4
commit b25bc9d81d
13 changed files with 143 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
import { ipcMain } from 'electron';
import { ConfigurationReply, DeviceConnectionState, IpcEvents, IpcResponse, LogService } from 'uhk-common';
import { ConfigurationReply, DeviceConnectionState, HardwareModules, IpcEvents, IpcResponse, LogService } from 'uhk-common';
import { snooze, UhkHidDevice, UhkOperations } from 'uhk-usb';
import { Observable } from 'rxjs/Observable';
import { Subscription } from 'rxjs/Subscription';
@@ -73,10 +73,15 @@ export class DeviceService {
try {
await this.device.waitUntilKeyboardBusy();
const result = await this.operations.loadConfigurations();
const modules: HardwareModules = {
leftModuleInfo: await this.operations.getLeftModuleVersionInfo(),
rightModuleInfo: await this.operations.getRightModuleVersionInfo()
};
response = {
success: true,
...result
...result,
modules
};
} catch (error) {
response = {