feat(config): Read / write hardware configuration area (#423)

* add write-hca.js

* refactor: Move config serializer into the uhk-common package

* refactor: Move getTransferBuffers into the uhk-usb package

* refactor: delete obsoleted classes

* build: add uhk-usb build command

* refactor: move eeprom transfer to uhk-usb package

* fix: Fix write-hca.js

* feat: load hardware config from the device and

* style: fix ts lint errors

* build: fix rxjs dependency resolve

* test: Add jasmine unit test framework to the tet serializer

* fix(user-config): A "type": "basic", properties to the "keystroke" action types

* feat(usb): set chmod+x on write-hca.js

* feat(usb): Create USB logger

* style: Fix type

* build: Add chalk to dependencies.

Chalk will colorize the output
This commit is contained in:
Róbert Kiss
2017-09-26 18:57:27 +02:00
committed by László Monda
parent 1122784bdb
commit 9294bede50
130 changed files with 9108 additions and 1991 deletions

View File

@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { UserConfiguration } from 'uhk-common';
import { UserConfiguration } from '../config-serializer/config-items/user-configuration';
import { AutoUpdateSettings } from '../models/auto-update-settings';
@Injectable()

View File

@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { UserConfiguration } from '../config-serializer/config-items/user-configuration';
import { UserConfiguration } from 'uhk-common';
@Injectable()
export class DefaultUserConfigurationService {
@@ -7,7 +7,7 @@ export class DefaultUserConfigurationService {
constructor() {
this._defaultConfig = new UserConfiguration()
.fromJsonObject(require('../config-serializer/user-config.json'));
.fromJsonObject(require('./user-config.json'));
}
getDefault(): UserConfiguration {

View File

@@ -9,7 +9,7 @@ import {
SaveConfigurationReplyAction,
SetPrivilegeOnLinuxReplyAction
} from '../store/actions/device';
import { LoadUserConfigFromDeviceReplyAction } from '../store/actions/user-config';
import { LoadConfigFromDeviceReplyAction } from '../store/actions/user-config';
@Injectable()
export class DeviceRendererService {
@@ -29,8 +29,8 @@ export class DeviceRendererService {
this.ipcRenderer.send(IpcEvents.device.saveUserConfiguration, JSON.stringify(buffer));
}
loadUserConfiguration(): void {
this.ipcRenderer.send(IpcEvents.device.loadUserConfiguration);
loadConfigurationFromKeyboard(): void {
this.ipcRenderer.send(IpcEvents.device.loadConfigurations);
}
private registerEvents(): void {
@@ -46,8 +46,8 @@ export class DeviceRendererService {
this.dispachStoreAction(new SaveConfigurationReplyAction(response));
});
this.ipcRenderer.on(IpcEvents.device.loadUserConfigurationReply, (event: string, response: string) => {
this.dispachStoreAction(new LoadUserConfigFromDeviceReplyAction(JSON.parse(response)));
this.ipcRenderer.on(IpcEvents.device.loadConfigurationReply, (event: string, response: string) => {
this.dispachStoreAction(new LoadConfigFromDeviceReplyAction(JSON.parse(response)));
});
}

View File

@@ -0,0 +1,8 @@
{
"signature": "UHK",
"dataModelVersion": 0,
"hardwareId": 0,
"brandId": 0,
"isIso": false,
"hasBacklighting": false
}

View File

@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { KeystrokeType } from '../config-serializer/config-items/key-action/keystroke-type';
import { KeystrokeType } from 'uhk-common';
@Injectable()
export class MapperService {

File diff suppressed because it is too large Load Diff