Skip to content

Commit

Permalink
Merge pull request #2553 from UltimateHackingKeyboard/feat-keep-recon…
Browse files Browse the repository at this point in the history
…necting-forever

feat: keep reconnecting forever upon kboot firmware update
  • Loading branch information
mondalaci authored Feb 22, 2025
2 parents dd32a54 + 33c6d4a commit 7fc3f2c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/uhk-usb/src/uhk-operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,7 @@ export class UhkOperations {
}

public async waitForKbootIdle(moduleName: string): Promise<boolean> {
const timeoutTime = new Date(new Date().getTime() + 30000);

while (new Date() < timeoutTime) {
while (true) {
const buffer = await this.device.write(Buffer.from([UsbCommand.GetProperty, DevicePropertyIds.CurrentKbootCommand]));
this.device.close();

Expand All @@ -427,8 +425,6 @@ export class UhkOperations {

await snooze(1000);
}

return false;
}

public async getModuleProperty({ module, property } : GetModulePropertyArguments): Promise<UhkBuffer> {
Expand Down

0 comments on commit 7fc3f2c

Please sign in to comment.