From b6f13547498f7c17984d91a8b50cd7c8bad48bac Mon Sep 17 00:00:00 2001 From: JovannMC Date: Wed, 18 Dec 2024 21:12:58 +0300 Subject: [PATCH] Update haritorax-interpreter to v3.2.3 I NEED TO TEST STUFF PROPERLY fixes logging not working when using auto detection --- package-lock.json | 8 ++++---- package.json | 2 +- src/main.ts | 9 ++++----- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9b3b645..0246e1b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@slimevr/common": "^0.1.2", "@slimevr/firmware-protocol": "^0.6.5", "@slimevr/tracker-emulation": "^0.2.4", - "haritorax-interpreter": "^3.2.2", + "haritorax-interpreter": "^3.2.3", "i18next": "^24.1.2", "loc-i18next": "^0.1.6", "lodash-es": "^4.17.21", @@ -3906,9 +3906,9 @@ } }, "node_modules/haritorax-interpreter": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/haritorax-interpreter/-/haritorax-interpreter-3.2.2.tgz", - "integrity": "sha512-9PiyQhk/KS0OnkxklX2xovg5FtXgSiqZa0manD7FSRiRHizp0cX2uVT7fLdEhcpEYsvBr/R7vIS8e4sdmSkTCw==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/haritorax-interpreter/-/haritorax-interpreter-3.2.3.tgz", + "integrity": "sha512-9MUhjy1E3LxJQeFNyima4Vv5QBgxLxqCjHEcqHGVseCJyk78fqMfo99TG0MjGMOf7jwQqANutYCb9Qa/dLziXA==", "license": "MIT", "dependencies": { "@abandonware/noble": "^1.9.2-25", diff --git a/package.json b/package.json index fda4eee..7f08a3f 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@slimevr/common": "^0.1.2", "@slimevr/firmware-protocol": "^0.6.5", "@slimevr/tracker-emulation": "^0.2.4", - "haritorax-interpreter": "^3.2.2", + "haritorax-interpreter": "^3.2.3", "i18next": "^24.1.2", "loc-i18next": "^0.1.6", "lodash-es": "^4.17.21", diff --git a/src/main.ts b/src/main.ts index eb82a91..6d37c6c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -761,7 +761,7 @@ ipcMain.handle("autodetect", async () => { device = undefined; log("Initializing new HaritoraX instance...", "detect"); - initializeDevice(true); + initializeDevice(); log("Getting available devices...", "detect"); @@ -843,10 +843,7 @@ ipcMain.on("start-connection", async (_event, arg) => { return false; } - if (shouldInitializeNewDevice()) { - initializeDevice(); - startDeviceListeners(); - } + if (shouldInitializeNewDevice()) initializeDevice(); mainWindow.webContents.send("set-status", "main.status.searching"); if (types.includes("bluetooth")) await device.startConnection("bluetooth"); @@ -896,6 +893,8 @@ function initializeDevice(forceDisableLogging: boolean = false) { effectiveLoggingMode.toString() ] || [false, false, false, false]; device = new HaritoraX(trackerType, logging, imuProcessing, rawData, printWrites); + + startDeviceListeners(); } async function notifyConnectedDevices(): Promise {