Skip to content

Commit

Permalink
v1.5.1
Browse files Browse the repository at this point in the history
+ Switch to TypeScript
+ Fix type errors for settings
+ Fix null errors when starting a connection
  • Loading branch information
JovannMC committed Apr 8, 2024
1 parent ea35cdf commit ed96a91
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ A node.js package that allows you to communicate and interact with the HaritoraX

Check out the Haritora-GX6 proof-of-concept repository here: https://github.com/JovannMC/haritora-gx6-poc

**This package is built with ESM. CommonJS and TypeScript support is in beta and may be buggy!**

## Installation

`npm install haritorax-interpreter`
Expand All @@ -34,7 +32,7 @@ Will write actual documentation at some point, for now refer to the source code,

**\* partial support**

## Example for ESM
## Example
```js
import { HaritoraXWireless } from "haritorax-interpreter";

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "haritorax-interpreter",
"version": "1.5.0",
"version": "1.5.1",
"homepage": "https://github.com/JovannMC/haritorax-interpreter",
"repository": "https://github.com/JovannMC/haritorax-interpreter",
"bugs": {
Expand Down
4 changes: 2 additions & 2 deletions src/devices/haritorax-wireless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export default class HaritoraXWireless extends EventEmitter {
* @example
* device.startConnection("gx");
**/
startConnection(connectionMode: string, portNames: string[]) {
startConnection(connectionMode: string, portNames?: string[]) {
if (connectionMode === "gx") {
gx.startConnection(portNames);
gxEnabled = true;
Expand Down Expand Up @@ -1239,7 +1239,7 @@ function processButtonData(
let buttonState = null;

try {
if (trackerName.startsWith("HaritoraX")) {
if (trackerName && trackerName.startsWith("HaritoraX")) {
if (characteristic === "MainButton") {
currentButtons[MAIN_BUTTON_INDEX] += 1;
} else if (characteristic === "SecondaryButton") {
Expand Down

0 comments on commit ed96a91

Please sign in to comment.