Skip to content

Commit 72b93fb

Browse files
committed
server: report firmware version on open
1 parent 7608723 commit 72b93fb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/ebb.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ export class EBB {
5151
}
5252
}
5353
}))
54-
this.firmwareVersion().then((version) => console.log("Firmware version", version));
55-
this.queryGeneral(); // clear the button press status on startup
5654
}
5755

5856
private get stepMultiplier() {

src/server.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,10 @@ async function* ebbs(path?: string) {
279279
const closed = new Promise((resolve) => {
280280
port.addEventListener('disconnect', resolve, { once: true })
281281
});
282-
yield new EBB(port);
282+
const ebb = new EBB(port);
283+
ebb.firmwareVersion().then((version) => console.log("Firmware version", version));
284+
ebb.queryGeneral(); // clear the button press status on startup
285+
yield ebb;
283286
await closed;
284287
yield null;
285288
console.error(`Lost connection to EBB, reconnecting...`);

0 commit comments

Comments
 (0)