@meshtastic/meshtasticjs
Advanced tools
Comparing version 0.6.86 to 0.6.87
@@ -156,3 +156,3 @@ import { SubEvent } from "sub-events"; | ||
*/ | ||
readonly onTextPacket: SubEvent<Types.TextPacket>; | ||
readonly onMessagePacket: SubEvent<Types.MessagePacket>; | ||
/** | ||
@@ -159,0 +159,0 @@ * Fires when a new MeshPacket message containing a Remote Hardware packet has been received from device |
@@ -164,3 +164,3 @@ import { SubEvent } from "sub-events"; | ||
*/ | ||
onTextPacket = new SubEvent(); | ||
onMessagePacket = new SubEvent(); | ||
/** | ||
@@ -667,3 +667,3 @@ * Fires when a new MeshPacket message containing a Remote Hardware packet has been received from device | ||
this.onPositionPacket.cancelAll(); | ||
this.onTextPacket.cancelAll(); | ||
this.onMessagePacket.cancelAll(); | ||
this.onRemoteHardwarePacket.cancelAll(); | ||
@@ -701,6 +701,7 @@ this.onDeviceStatus.cancelAll(); | ||
case PortNum.TEXT_MESSAGE_APP: | ||
this.log(Types.EmitterScope.iMeshDevice, Types.Emitter.handleMeshPacket, "Received onTextPacket", LogRecord_Level.TRACE, dataPacket.payload); | ||
this.onTextPacket.emit({ | ||
this.log(Types.EmitterScope.iMeshDevice, Types.Emitter.handleMeshPacket, "Received onMessagePacket", LogRecord_Level.TRACE, dataPacket.payload); | ||
this.onMessagePacket.emit({ | ||
packet: meshPacket, | ||
data: new TextDecoder().decode(dataPacket.payload) | ||
text: new TextDecoder().decode(dataPacket.payload), | ||
location: dataPacket.location | ||
}); | ||
@@ -707,0 +708,0 @@ break; |
/// <reference types="web-bluetooth" /> | ||
/// <reference types="w3c-web-serial" /> | ||
import type { IBLEConnection, IHTTPConnection, ISerialConnection, Protobuf } from "./index.js"; | ||
import type { MeshPacket, NodeInfo, Position, Routing, User } from "./generated/mesh.js"; | ||
import type { Location, MeshPacket, NodeInfo, Position, Routing, User } from "./generated/mesh.js"; | ||
export declare enum DeviceStatusEnum { | ||
@@ -70,5 +70,6 @@ DEVICE_RESTARTING = 0, | ||
} | ||
export interface TextPacket { | ||
export interface MessagePacket { | ||
packet: MeshPacket; | ||
data: string; | ||
text: string; | ||
location?: Location; | ||
} | ||
@@ -75,0 +76,0 @@ export interface PingPacket { |
{ | ||
"name": "@meshtastic/meshtasticjs", | ||
"version": "0.6.86", | ||
"version": "0.6.87", | ||
"description": "Browser library for interfacing with meshtastic devices", | ||
@@ -5,0 +5,0 @@ "license": "GPL-3.0-only", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
514064
10582