Skip to content

v3.2.0

Compare
Choose a tag to compare
@JovannMC JovannMC released this 18 Nov 14:53
· 15 commits to main since this release
159aa16

The v3.2.0 release of the HaritoraX-Interpreter package is now out to coincide with SlimeTora v1.4.0. This is a minor release adding support for the new part assignments and (hopefully) finally fixing BTSPP/HaritoraX Wired detection.

Changelogs

  • Add support for new part assignments
    • With you being able to buy individual trackers, there are 5 new assignments:
      • L/R wrists, L/R feet, & head
    • Hopefully this should just work, lol
  • Optimized assignment logic for GX dongles
    • Finally removed the janky assignment logic I made before since we can now request info from the dongles!
    • No more weird delay :p
  • Make powerOffTracker() async
    • Should've been async in the first place
    • Instance can get destroyed/interrupted before all commands are run and cause soft bricking (tracker keeps turning off after being powered on)
      • I found this out while implementing the "power off on exit" feature on SlimeTora lol
  • Fix HaritoraX Wired/BTSPP detection (finally?)
    • Unknown for Linux
  • Removed async on getTrackerSettings()
  • Package updates

Installation

npm install haritorax-interpreter

Documentation

Will write actual documentation at some point, for now refer to the source code, examples, and JSDoc comments. You may also see how it's used in SlimeTora!

Supported devices

Device Supported Elbow/Hip support
HaritoraX Wireless Y Y
HaritoraX 1.1B Y Y
HaritoraX 1.1 Y Y
HaritoraX 1.0 Y Y
Haritora ? ?
Communication mode Supported
Bluetooth (Low Energy) Y
Bluetooth Classic (COM) Y
GX6 Communication Dongle Y
GX2 Communication Dongle Y

Example

import { HaritoraX } from "haritorax-interpreter";

// connect to haritorax wireless, enable debug logs, allow printing of processIMUData() logs (lots of spam), print raw unprocessed data (more spam!)
let device = new HaritoraX("wireless", true, true, true);
// start connecting to dongles via GX dongles (COM connection), with the ports COM4, COM5, COM6, and COM7
device.startConnection("com", ["COM4", "COM5", "COM6", "COM7"]);

device.on("imu", (trackerName, rotation, gravity, ankle) => {
    // IMU data received, do stuff
});

setTimeout(() => {
    // apply the following settings to the rightAnkle tracker:
    // sensor mode: 1 (magnetometer enabled)
    // posture data transfer rate: 100FPS
    // sensor auto correction mode: accelerometer and gyroscope
    // ankle motion detection: enabled
    device.setTrackerSettings("rightAnkle", 1, 100, ['accel', 'gyro'], true);
}, 2000)

setTimeout(() => {
    device.stopConnection("com");
}, 10000)

Full Changelog: v3.1.0...v3.2.0