Skip to content

Commit

Permalink
server: report firmware version on open
Browse files Browse the repository at this point in the history
  • Loading branch information
osresearch committed Oct 29, 2024
1 parent 7608723 commit 72b93fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/ebb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ export class EBB {
}
}
}))
this.firmwareVersion().then((version) => console.log("Firmware version", version));
this.queryGeneral(); // clear the button press status on startup
}

private get stepMultiplier() {
Expand Down
5 changes: 4 additions & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,10 @@ async function* ebbs(path?: string) {
const closed = new Promise((resolve) => {
port.addEventListener('disconnect', resolve, { once: true })
});
yield new EBB(port);
const ebb = new EBB(port);
ebb.firmwareVersion().then((version) => console.log("Firmware version", version));
ebb.queryGeneral(); // clear the button press status on startup
yield ebb;
await closed;
yield null;
console.error(`Lost connection to EBB, reconnecting...`);
Expand Down

0 comments on commit 72b93fb

Please sign in to comment.