fix: 尝试修复示波器与旋转编码器无法工作的问题

This commit is contained in:
2025-08-20 16:40:38 +08:00
parent 62c16c016d
commit 4c9b9cd3d6
3 changed files with 8 additions and 9 deletions

View File

@@ -30,7 +30,7 @@ export const useRotaryEncoder = defineStore("RotaryEncoder", () => {
clearHub();
});
function initHub() {
async function initHub() {
if (rotaryEncoderHub.value) return;
const connection = AuthManager.createHubConnection("RotaryEncoderHub");
const proxy =
@@ -39,7 +39,7 @@ export const useRotaryEncoder = defineStore("RotaryEncoder", () => {
connection,
rotaryEncoderReceiver,
);
connection.start();
await connection.start();
rotaryEncoderHub.value = { connection, proxy };
}