Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@meshtastic/meshtasticjs

Package Overview
Dependencies
Maintainers
1
Versions
181
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@meshtastic/meshtasticjs - npm Package Compare versions

Comparing version 0.6.104 to 0.6.105

2

dist/generated/config.d.ts

@@ -617,3 +617,3 @@ import { MessageType } from "@protobuf-ts/runtime";

* The denominator of the coding rate.
* ie for 4/8, the value is 8. 5/8 the value is 5.
* ie for 4/5, the value is 5. 4/8 the value is 8.
*

@@ -620,0 +620,0 @@ * @generated from protobuf field: uint32 coding_rate = 5;

@@ -200,3 +200,17 @@ import { MessageType } from "@protobuf-ts/runtime";

*/
LPS22 = 8
LPS22 = 8,
/**
*
* 3-Axis magnetic sensor
*
* @generated from protobuf enum value: QMC6310 = 9;
*/
QMC6310 = 9,
/**
*
* 6-Axis inertial measurement sensor
*
* @generated from protobuf enum value: QMI8658 = 10;
*/
QMI8658 = 10
}

@@ -203,0 +217,0 @@ declare class DeviceMetrics$Type extends MessageType<DeviceMetrics> {

@@ -76,2 +76,16 @@ // @generated by protobuf-ts 2.8.1 with parameter long_type_string

TelemetrySensorType[TelemetrySensorType["LPS22"] = 8] = "LPS22";
/**
*
* 3-Axis magnetic sensor
*
* @generated from protobuf enum value: QMC6310 = 9;
*/
TelemetrySensorType[TelemetrySensorType["QMC6310"] = 9] = "QMC6310";
/**
*
* 6-Axis inertial measurement sensor
*
* @generated from protobuf enum value: QMI8658 = 10;
*/
TelemetrySensorType[TelemetrySensorType["QMI8658"] = 10] = "QMI8658";
})(TelemetrySensorType || (TelemetrySensorType = {}));

@@ -78,0 +92,0 @@ // @generated message type with reflection information, may provide speed optimized methods

@@ -220,4 +220,4 @@ import { SubEvent } from "sub-events";

* Default is `false`
* @param {Types.channelNumber} [channel=0] Channel number to send to. Default
* is `0`. Default is `0`
* @param {Types.channelNumber} [channel=Types.ChannelNumber.PRIMARY] Channel
* number to send to. Default is `Types.ChannelNumber.PRIMARY`
* @param {(id: number) => Promise<void>} [callback] If wantAck is true,

@@ -234,3 +234,4 @@ * callback is called when the ack is received

* @param {boolean} wantAck Whether or not acknowledgement is wanted
* @param {Types.ChannelNumber} channel Channel to send on default of 0
* @param {Types.ChannelNumber} [channel=Types.ChannelNumber.PRIMARY] Channel
* to send on. Default is `Types.ChannelNumber.PRIMARY`
* @param {(id: number) => Promise<void>} [callback] If wantAck is true,

@@ -249,3 +250,4 @@ * callback is called when the ack is received

* Default is `false`
* @param {Types.ChannelNumber} [channel=0] Channel to send. Default is `0`
* @param {Types.ChannelNumber} [channel=Types.ChannelNumber.PRIMARY] Channel
* to send. Default is `Types.ChannelNumber.PRIMARY`
* @param {boolean} [wantResponse=false] Used for testing, requests recpipient

@@ -369,6 +371,7 @@ * to respond in kind with the same type of request. Default is `false`

*
* @param {number} nodeNum Destination Node to be queried
* @param {(id: number) => Promise<void>} [callback] If wantAck is true,
* callback is called when the ack is received
*/
getMetadata(callback?: (id: number) => Promise<void>): Promise<void>;
getMetadata(nodeNum: number, callback?: (id: number) => Promise<void>): Promise<void>;
/**

@@ -375,0 +378,0 @@ * Resets the internal NodeDB of the radio, usefull for removing old nodes

@@ -241,4 +241,4 @@ import { SubEvent } from "sub-events";

* Default is `false`
* @param {Types.channelNumber} [channel=0] Channel number to send to. Default
* is `0`. Default is `0`
* @param {Types.channelNumber} [channel=Types.ChannelNumber.PRIMARY] Channel
* number to send to. Default is `Types.ChannelNumber.PRIMARY`
* @param {(id: number) => Promise<void>} [callback] If wantAck is true,

@@ -248,3 +248,3 @@ * callback is called when the ack is received

*/
sendText(text, destinationNum, wantAck = false, channel = 0, callback) {
sendText(text, destinationNum, wantAck = false, channel = Types.ChannelNumber.PRIMARY, callback) {
this.log(Types.EmitterScope.iMeshDevice, Types.Emitter.sendText, `📤 Sending message to ${destinationNum ?? "broadcast"} on channel ${channel.toString()}`, Protobuf.LogRecord_Level.DEBUG);

@@ -260,3 +260,4 @@ const enc = new TextEncoder();

* @param {boolean} wantAck Whether or not acknowledgement is wanted
* @param {Types.ChannelNumber} channel Channel to send on default of 0
* @param {Types.ChannelNumber} [channel=Types.ChannelNumber.PRIMARY] Channel
* to send on. Default is `Types.ChannelNumber.PRIMARY`
* @param {(id: number) => Promise<void>} [callback] If wantAck is true,

@@ -266,3 +267,3 @@ * callback is called when the ack is received

*/
sendWaypoint(waypoint, destinationNum, wantAck = false, channel = 0, callback) {
sendWaypoint(waypoint, destinationNum, wantAck = false, channel = Types.ChannelNumber.PRIMARY, callback) {
this.log(Types.EmitterScope.iMeshDevice, Types.Emitter.sendWaypoint, `📤 Sending waypoint to ${destinationNum ?? "broadcast"} on channel ${channel.toString()}`, Protobuf.LogRecord_Level.DEBUG);

@@ -279,3 +280,4 @@ return this.sendPacket(Protobuf.Waypoint.toBinary(waypoint), Protobuf.PortNum.WAYPOINT_APP, destinationNum, wantAck, channel, undefined, true, callback, undefined);

* Default is `false`
* @param {Types.ChannelNumber} [channel=0] Channel to send. Default is `0`
* @param {Types.ChannelNumber} [channel=Types.ChannelNumber.PRIMARY] Channel
* to send. Default is `Types.ChannelNumber.PRIMARY`
* @param {boolean} [wantResponse=false] Used for testing, requests recpipient

@@ -290,3 +292,3 @@ * to respond in kind with the same type of request. Default is `false`

*/
async sendPacket(byteData, portNum, destinationNum, wantAck = false, channel = 0, wantResponse = false, echoResponse = false, callback, emoji = 0, replyId = 0) {
async sendPacket(byteData, portNum, destinationNum, wantAck = false, channel = Types.ChannelNumber.PRIMARY, wantResponse = false, echoResponse = false, callback, emoji = 0, replyId = 0) {
this.log(Types.EmitterScope.iMeshDevice, Types.Emitter.sendPacket, `📤 Sending ${Protobuf.PortNum[portNum] ?? "UNK"} to ${destinationNum ?? "broadcast"}`, Protobuf.LogRecord_Level.TRACE);

@@ -628,7 +630,8 @@ const meshPacket = Protobuf.MeshPacket.create({

*
* @param {number} nodeNum Destination Node to be queried
* @param {(id: number) => Promise<void>} [callback] If wantAck is true,
* callback is called when the ack is received
*/
async getMetadata(callback) {
this.log(Types.EmitterScope.iMeshDevice, Types.Emitter.getMetadata, `Requesting owner ${callback ? "with" : "without"} callback`, Protobuf.LogRecord_Level.DEBUG);
async getMetadata(nodeNum, callback) {
this.log(Types.EmitterScope.iMeshDevice, Types.Emitter.getMetadata, `Requesting metadata from ${nodeNum} ${callback ? "with" : "without"} callback`, Protobuf.LogRecord_Level.DEBUG);
const getDeviceMetricsRequest = Protobuf.AdminMessage.toBinary({

@@ -640,3 +643,3 @@ payloadVariant: {

});
await this.sendPacket(getDeviceMetricsRequest, Protobuf.PortNum.ADMIN_APP, this.myNodeInfo.myNodeNum, true, 0, true, false, callback);
await this.sendPacket(getDeviceMetricsRequest, Protobuf.PortNum.ADMIN_APP, nodeNum, true, Types.ChannelNumber.ADMIN, true, false, callback);
}

@@ -643,0 +646,0 @@ /**

@@ -163,3 +163,12 @@ /// <reference types="web-bluetooth" />

}
export declare type ChannelNumber = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
export declare enum ChannelNumber {
PRIMARY = 0,
CHANNEL1 = 1,
CHANNEL2 = 2,
CHANNEL3 = 3,
CHANNEL4 = 4,
CHANNEL5 = 5,
CHANNEL6 = 6,
ADMIN = 7
}
export declare type ConnectionType = IBLEConnection | IHTTPConnection | ISerialConnection;

@@ -49,2 +49,13 @@ export var DeviceStatusEnum;

})(Emitter || (Emitter = {}));
export var ChannelNumber;
(function (ChannelNumber) {
ChannelNumber[ChannelNumber["PRIMARY"] = 0] = "PRIMARY";
ChannelNumber[ChannelNumber["CHANNEL1"] = 1] = "CHANNEL1";
ChannelNumber[ChannelNumber["CHANNEL2"] = 2] = "CHANNEL2";
ChannelNumber[ChannelNumber["CHANNEL3"] = 3] = "CHANNEL3";
ChannelNumber[ChannelNumber["CHANNEL4"] = 4] = "CHANNEL4";
ChannelNumber[ChannelNumber["CHANNEL5"] = 5] = "CHANNEL5";
ChannelNumber[ChannelNumber["CHANNEL6"] = 6] = "CHANNEL6";
ChannelNumber[ChannelNumber["ADMIN"] = 7] = "ADMIN";
})(ChannelNumber || (ChannelNumber = {}));
//# sourceMappingURL=types.js.map
{
"name": "@meshtastic/meshtasticjs",
"version": "0.6.104",
"version": "0.6.105",
"description": "Browser library for interfacing with meshtastic devices",

@@ -38,7 +38,7 @@ "license": "GPL-3.0-only",

"@protobuf-ts/plugin": "2.8.1",
"@types/w3c-web-serial": "^1.0.2",
"@types/w3c-web-serial": "^1.0.3",
"@types/web-bluetooth": "^0.0.15",
"@typescript-eslint/eslint-plugin": "^5.38.1",
"@typescript-eslint/parser": "^5.38.1",
"eslint": "^8.24.0",
"@typescript-eslint/eslint-plugin": "^5.39.0",
"@typescript-eslint/parser": "^5.39.0",
"eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0",

@@ -45,0 +45,0 @@ "eslint-import-resolver-typescript": "^3.5.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc