Skip to content

Commit

Permalink
fix logging
Browse files Browse the repository at this point in the history
  • Loading branch information
JovannMC committed Jul 25, 2024
1 parent 325bdde commit 053dd77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/HaritoraX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ export default class HaritoraX extends EventEmitter {
let com = new COM("wireless"); // variable doesn't matter, just need to initialize it to get the available devices
let bluetooth = new Bluetooth();

console.log("Checking if any COM devices is available")
log("Checking if any COM devices is available")
if (await com.isDeviceAvailable()) {
log("COM devices available")
const devices = await com.getAvailableDevices();
Expand Down Expand Up @@ -1078,12 +1078,12 @@ function processIMUData(data: Buffer, trackerName: string, ankleValue?: number)

// If tracker isn't in activeDevices, add it and emit "connect" event
if (trackerName && !activeDevices.includes(trackerName) && (comEnabled || bluetoothEnabled)) {
console.log(`Tracker ${trackerName} isn't in active devices, adding and emitting connect event`);
log(`Tracker ${trackerName} isn't in active devices, adding and emitting connect event`);

const mode = isWirelessBT(trackerName) ? "bluetooth" : "com";
const port = isWirelessBT(trackerName) ? undefined : com.getTrackerPort(trackerName);

console.log(`Tracker ${trackerName} mode: ${mode}, port: ${port}`);
log(`Tracker ${trackerName} mode: ${mode}, port: ${port}`);

activeDevices.push(trackerName);
main.emit("connect", trackerName, mode, port);
Expand Down

0 comments on commit 053dd77

Please sign in to comment.