Make write-hca.js work.
This commit is contained in:
@@ -82,12 +82,8 @@ export class UhkHidDevice {
|
||||
});
|
||||
}
|
||||
|
||||
public async writeUserConfigToEeprom(): Promise<void> {
|
||||
await this.write(new Buffer([
|
||||
UsbCommand.LaunchEepromTransfer,
|
||||
EepromOperation.write,
|
||||
ConfigBufferId.validatedUserConfig
|
||||
]));
|
||||
public async writeConfigToEeprom(configBufferId: ConfigBufferId): Promise<void> {
|
||||
await this.write(new Buffer([UsbCommand.LaunchEepromTransfer, EepromOperation.write, configBufferId]));
|
||||
await this.waitUntilKeyboardBusy();
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ export class UhkOperations {
|
||||
this.logService.debug('[DeviceOperation] USB[T]: Write user configuration to keyboard');
|
||||
await this.sendUserConfigToKeyboard(json);
|
||||
this.logService.debug('[DeviceOperation] USB[T]: Write user configuration to EEPROM');
|
||||
await this.device.writeUserConfigToEeprom();
|
||||
await this.device.writeConfigToEeprom(ConfigBufferId.validatedUserConfig);
|
||||
}
|
||||
catch (error) {
|
||||
this.logService.error('[DeviceOperation] Transferring error', error);
|
||||
|
||||
Reference in New Issue
Block a user