@meshtastic/meshtasticjs
Advanced tools
Comparing version 0.6.12 to 0.6.13
@@ -10,2 +10,6 @@ import { IBLEConnection } from "./ibleconnection"; | ||
export class Client { | ||
/** | ||
* Array containing all created connection interfaces | ||
*/ | ||
deviceInterfaces; | ||
constructor() { | ||
@@ -12,0 +16,0 @@ this.deviceInterfaces = []; |
@@ -1016,5 +1016,7 @@ import { BinaryWriteOptions } from "@protobuf-ts/runtime"; | ||
/** | ||
* @generated from protobuf enum value: HELTEC = 5; | ||
* The original heltec WiFi_Lora_32_V2, which had battery voltage sensing hooked to GPIO 13 (see HELTEC_V2 for the new version). | ||
* | ||
* @generated from protobuf enum value: HELTEC_V2_0 = 5; | ||
*/ | ||
HELTEC = 5, | ||
HELTEC_V2_0 = 5, | ||
/** | ||
@@ -1037,3 +1039,9 @@ * @generated from protobuf enum value: TBEAM0p7 = 6; | ||
/** | ||
* The new version of the heltec WiFi_Lora_32_V2 board that has battery sensing hooked to GPIO 37. Sadly they did not update anything on the silkscreen to identify this board | ||
* | ||
* @generated from protobuf enum value: HELTEC_V2_1 = 10; | ||
*/ | ||
HELTEC_V2_1 = 10, | ||
/** | ||
* | ||
* Less common/prototype boards listed here (needs one more byte over the air) | ||
@@ -1090,8 +1098,8 @@ * | ||
* From mesh.options | ||
* note: this payload length is ONLY the bytes that are sent inside of the radiohead packet | ||
* Data.payload max_size:240 | ||
* note: this payload length is ONLY the bytes that are sent inside of the Data protobuf (excluding protobuf overhead). The 16 byte header is | ||
* outside of this envelope | ||
* | ||
* @generated from protobuf enum value: DATA_PAYLOAD_LEN = 240; | ||
* @generated from protobuf enum value: DATA_PAYLOAD_LEN = 237; | ||
*/ | ||
DATA_PAYLOAD_LEN = 240 | ||
DATA_PAYLOAD_LEN = 237 | ||
} | ||
@@ -1098,0 +1106,0 @@ /** |
@@ -237,5 +237,7 @@ import { WireType } from "@protobuf-ts/runtime"; | ||
/** | ||
* @generated from protobuf enum value: HELTEC = 5; | ||
* The original heltec WiFi_Lora_32_V2, which had battery voltage sensing hooked to GPIO 13 (see HELTEC_V2 for the new version). | ||
* | ||
* @generated from protobuf enum value: HELTEC_V2_0 = 5; | ||
*/ | ||
HardwareModel[HardwareModel["HELTEC"] = 5] = "HELTEC"; | ||
HardwareModel[HardwareModel["HELTEC_V2_0"] = 5] = "HELTEC_V2_0"; | ||
/** | ||
@@ -258,3 +260,9 @@ * @generated from protobuf enum value: TBEAM0p7 = 6; | ||
/** | ||
* The new version of the heltec WiFi_Lora_32_V2 board that has battery sensing hooked to GPIO 37. Sadly they did not update anything on the silkscreen to identify this board | ||
* | ||
* @generated from protobuf enum value: HELTEC_V2_1 = 10; | ||
*/ | ||
HardwareModel[HardwareModel["HELTEC_V2_1"] = 10] = "HELTEC_V2_1"; | ||
/** | ||
* | ||
* Less common/prototype boards listed here (needs one more byte over the air) | ||
@@ -312,8 +320,8 @@ * | ||
* From mesh.options | ||
* note: this payload length is ONLY the bytes that are sent inside of the radiohead packet | ||
* Data.payload max_size:240 | ||
* note: this payload length is ONLY the bytes that are sent inside of the Data protobuf (excluding protobuf overhead). The 16 byte header is | ||
* outside of this envelope | ||
* | ||
* @generated from protobuf enum value: DATA_PAYLOAD_LEN = 240; | ||
* @generated from protobuf enum value: DATA_PAYLOAD_LEN = 237; | ||
*/ | ||
Constants[Constants["DATA_PAYLOAD_LEN"] = 240] = "DATA_PAYLOAD_LEN"; | ||
Constants[Constants["DATA_PAYLOAD_LEN"] = 237] = "DATA_PAYLOAD_LEN"; | ||
})(Constants || (Constants = {})); | ||
@@ -320,0 +328,0 @@ /** |
@@ -45,8 +45,2 @@ /** | ||
* | ||
* A message receive acknowledgment, sent in cleartext - allows radio to | ||
* show user that a message has been read by the recipient, optional | ||
* Note: this concept has been removed for now. | ||
* Once READACK is implemented, use the new packet type/port number stuff? | ||
* @exclude | ||
* CLEAR_READACK = 2; | ||
* Reserved for built-in GPIO/example app. | ||
@@ -61,4 +55,3 @@ * See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number | ||
* The built-in position messaging app. | ||
* See Position for details on the message sent to this port number. | ||
* payload is a Position protobuf | ||
* Payload is a [Position](/developers/protobufs/api.md#position) message | ||
* | ||
@@ -71,4 +64,3 @@ * @generated from protobuf enum value: POSITION_APP = 3; | ||
* The built-in user info app. | ||
* See User for details on the message sent to this port number. | ||
* payload is a User protobuf | ||
* Payload is a [User](/developers/protobufs/api.md#user) message | ||
* | ||
@@ -80,3 +72,4 @@ * @generated from protobuf enum value: NODEINFO_APP = 4; | ||
* | ||
* Protocol control packets for mesh protocol use, payload is a Routing protobuf | ||
* Protocol control packets for mesh protocol use. | ||
* Payload is a [Routing](/developers/protobufs/api.md#routing) message | ||
* | ||
@@ -88,3 +81,4 @@ * @generated from protobuf enum value: ROUTING_APP = 5; | ||
* | ||
* Admin control packets, payload is a AdminMessage protobuf | ||
* Admin control packets. | ||
* Payload is a [AdminMessage](/developers/protobufs/api.md#adminmessage) message | ||
* | ||
@@ -97,3 +91,3 @@ * @generated from protobuf enum value: ADMIN_APP = 6; | ||
* Provides a 'ping' service that replies to any packet it receives. | ||
* Also this serves as a small example plugin. | ||
* Also serves as a small example plugin. | ||
* | ||
@@ -150,3 +144,3 @@ * @generated from protobuf enum value: REPLY_APP = 32; | ||
* To simplify initial development and testing you can use "PRIVATE_APP" | ||
* in your code without needing to rebuild protobuf files (via bin/regin_protos.sh) | ||
* in your code without needing to rebuild protobuf files (via [regen-protos.sh](https://github.com/meshtastic/Meshtastic-device/blob/master/bin/regen-protos.sh)) | ||
* | ||
@@ -153,0 +147,0 @@ * @generated from protobuf enum value: PRIVATE_APP = 256; |
@@ -49,8 +49,2 @@ // @generated by protobuf-ts 1.0.13 with parameters long_type_string | ||
* | ||
* A message receive acknowledgment, sent in cleartext - allows radio to | ||
* show user that a message has been read by the recipient, optional | ||
* Note: this concept has been removed for now. | ||
* Once READACK is implemented, use the new packet type/port number stuff? | ||
* @exclude | ||
* CLEAR_READACK = 2; | ||
* Reserved for built-in GPIO/example app. | ||
@@ -65,4 +59,3 @@ * See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number | ||
* The built-in position messaging app. | ||
* See Position for details on the message sent to this port number. | ||
* payload is a Position protobuf | ||
* Payload is a [Position](/developers/protobufs/api.md#position) message | ||
* | ||
@@ -75,4 +68,3 @@ * @generated from protobuf enum value: POSITION_APP = 3; | ||
* The built-in user info app. | ||
* See User for details on the message sent to this port number. | ||
* payload is a User protobuf | ||
* Payload is a [User](/developers/protobufs/api.md#user) message | ||
* | ||
@@ -84,3 +76,4 @@ * @generated from protobuf enum value: NODEINFO_APP = 4; | ||
* | ||
* Protocol control packets for mesh protocol use, payload is a Routing protobuf | ||
* Protocol control packets for mesh protocol use. | ||
* Payload is a [Routing](/developers/protobufs/api.md#routing) message | ||
* | ||
@@ -92,3 +85,4 @@ * @generated from protobuf enum value: ROUTING_APP = 5; | ||
* | ||
* Admin control packets, payload is a AdminMessage protobuf | ||
* Admin control packets. | ||
* Payload is a [AdminMessage](/developers/protobufs/api.md#adminmessage) message | ||
* | ||
@@ -101,3 +95,3 @@ * @generated from protobuf enum value: ADMIN_APP = 6; | ||
* Provides a 'ping' service that replies to any packet it receives. | ||
* Also this serves as a small example plugin. | ||
* Also serves as a small example plugin. | ||
* | ||
@@ -154,3 +148,3 @@ * @generated from protobuf enum value: REPLY_APP = 32; | ||
* To simplify initial development and testing you can use "PRIVATE_APP" | ||
* in your code without needing to rebuild protobuf files (via bin/regin_protos.sh) | ||
* in your code without needing to rebuild protobuf files (via [regen-protos.sh](https://github.com/meshtastic/Meshtastic-device/blob/master/bin/regen-protos.sh)) | ||
* | ||
@@ -157,0 +151,0 @@ * @generated from protobuf enum value: PRIVATE_APP = 256; |
@@ -11,2 +11,42 @@ import { Types } from "./"; | ||
export class IBLEConnection extends IMeshDevice { | ||
/** | ||
* Currently connected BLE device | ||
*/ | ||
device; | ||
/** | ||
* Connection interface to currently connected BLE device | ||
*/ | ||
connection; | ||
/** | ||
* Short Description | ||
*/ | ||
service; | ||
/** | ||
* Short Description | ||
*/ | ||
toRadioCharacteristic; | ||
/** | ||
* Short Description | ||
*/ | ||
fromRadioCharacteristic; | ||
/** | ||
* Short Description | ||
*/ | ||
fromNumCharacteristic; | ||
/** | ||
* States if the device was force disconnected by a user | ||
*/ | ||
userInitiatedDisconnect; | ||
/** | ||
* Queue that holds data to be written to the device, to prevent simultaneous writes | ||
*/ | ||
writeQueue; | ||
/** | ||
* Weather the we should currently write to the device or not, to prevent simultaneous writes | ||
*/ | ||
writeLock; | ||
/** | ||
* Set when a read promise has yet to be resolved, to prevent simultaneous reads. | ||
*/ | ||
pendingRead; | ||
constructor() { | ||
@@ -13,0 +53,0 @@ super(); |
@@ -10,2 +10,10 @@ import { Types } from "./"; | ||
export class IHTTPConnection extends IMeshDevice { | ||
/** | ||
* URL of the device that is to be connected to. | ||
*/ | ||
url; | ||
/** | ||
* Enables receiving messages all at once, versus one per request | ||
*/ | ||
receiveBatchRequests; | ||
constructor() { | ||
@@ -12,0 +20,0 @@ super(); |
@@ -12,61 +12,19 @@ import { Subject } from "rxjs"; | ||
export class IMeshDevice { | ||
/** | ||
* Describes the current state of the device | ||
*/ | ||
deviceStatus; | ||
/** | ||
* Describes the current state of the device | ||
*/ | ||
isConfigured; | ||
/** | ||
* Device's node number | ||
*/ | ||
myNodeInfo; | ||
/** | ||
* Randomly generated number to ensure confiuration lockstep | ||
*/ | ||
configId; | ||
constructor() { | ||
/** | ||
* Fires when a new FromRadio message has been received from the device | ||
* @event | ||
*/ | ||
this.onFromRadioEvent = new Subject(); | ||
/** | ||
* Fires when a new FromRadio message containing a Data packet has been received from the device | ||
* @event | ||
*/ | ||
this.onMeshPacketEvent = new Subject(); | ||
/** | ||
* Fires when a new MyNodeInfo message has been received from the device | ||
*/ | ||
this.onMyNodeInfoEvent = new Subject(); | ||
/** | ||
* Fires when a new RadioConfig message has been received from the device | ||
*/ | ||
this.onRadioConfigEvent = new Subject(); | ||
/** | ||
* Fires when a new MeshPacket message containing a NodeInfo packet has been received from device | ||
* @event | ||
*/ | ||
this.onNodeInfoPacketEvent = new Subject(); | ||
/** | ||
* Fires when a new MeshPacket message containing a AndminMessage packet has been received from device | ||
* @event | ||
*/ | ||
this.onAdminPacketEvent = new Subject(); | ||
/** | ||
* Fires when a new MeshPacket message containing a Routing packet has been received from device | ||
* @event | ||
*/ | ||
this.onRoutingPacketEvent = new Subject(); | ||
/** | ||
* Fires when a new MeshPacket message containing a Position packet has been received from device | ||
* @event | ||
*/ | ||
this.onPositionPacketEvent = new Subject(); | ||
/** | ||
* Fires when a new MeshPacket message containing a Text packet has been received from device | ||
* @event | ||
*/ | ||
this.onTextPacketEvent = new Subject(); | ||
/** | ||
* Fires when the devices connection or configuration status changes | ||
* @event | ||
*/ | ||
this.onDeviceStatusEvent = new Subject(); | ||
/** | ||
* Fires when a new FromRadio message containing a Text packet has been received from device | ||
* @event | ||
*/ | ||
this.onLogRecordEvent = new Subject(); | ||
/** | ||
* Fires when the device receives a meshPacket, returns a timestamp | ||
* @event | ||
*/ | ||
this.onMeshHeartbeat = new Subject(); | ||
this.deviceStatus = Types.DeviceStatusEnum.DEVICE_DISCONNECTED; | ||
@@ -105,2 +63,60 @@ this.isConfigured = false; | ||
/** | ||
* Fires when a new FromRadio message has been received from the device | ||
* @event | ||
*/ | ||
onFromRadioEvent = new Subject(); | ||
/** | ||
* Fires when a new FromRadio message containing a Data packet has been received from the device | ||
* @event | ||
*/ | ||
onMeshPacketEvent = new Subject(); | ||
/** | ||
* Fires when a new MyNodeInfo message has been received from the device | ||
*/ | ||
onMyNodeInfoEvent = new Subject(); | ||
/** | ||
* Fires when a new RadioConfig message has been received from the device | ||
*/ | ||
onRadioConfigEvent = new Subject(); | ||
/** | ||
* Fires when a new MeshPacket message containing a NodeInfo packet has been received from device | ||
* @event | ||
*/ | ||
onNodeInfoPacketEvent = new Subject(); | ||
/** | ||
* Fires when a new MeshPacket message containing a AndminMessage packet has been received from device | ||
* @event | ||
*/ | ||
onAdminPacketEvent = new Subject(); | ||
/** | ||
* Fires when a new MeshPacket message containing a Routing packet has been received from device | ||
* @event | ||
*/ | ||
onRoutingPacketEvent = new Subject(); | ||
/** | ||
* Fires when a new MeshPacket message containing a Position packet has been received from device | ||
* @event | ||
*/ | ||
onPositionPacketEvent = new Subject(); | ||
/** | ||
* Fires when a new MeshPacket message containing a Text packet has been received from device | ||
* @event | ||
*/ | ||
onTextPacketEvent = new Subject(); | ||
/** | ||
* Fires when the devices connection or configuration status changes | ||
* @event | ||
*/ | ||
onDeviceStatusEvent = new Subject(); | ||
/** | ||
* Fires when a new FromRadio message containing a Text packet has been received from device | ||
* @event | ||
*/ | ||
onLogRecordEvent = new Subject(); | ||
/** | ||
* Fires when the device receives a meshPacket, returns a timestamp | ||
* @event | ||
*/ | ||
onMeshHeartbeat = new Subject(); | ||
/** | ||
* Sends a text over the radio | ||
@@ -107,0 +123,0 @@ * @param text |
@@ -7,2 +7,14 @@ import { Types } from "./"; | ||
export class ISerialConnection extends IMeshDevice { | ||
/** | ||
* Serial port used to communicate with device. | ||
*/ | ||
port; | ||
/** | ||
* Readable stream from serial port. | ||
*/ | ||
reader; | ||
/** | ||
* Writable stream to serial port. | ||
*/ | ||
writer; | ||
constructor() { | ||
@@ -45,3 +57,3 @@ super(); | ||
await this.port.open({ | ||
baudRate: parameters.baudRate ? parameters.baudRate : 921600 | ||
baudRate: parameters.baudRate ?? 921600 | ||
}); | ||
@@ -48,0 +60,0 @@ let byteBuffer = new Uint8Array([]); |
@@ -8,2 +8,6 @@ import { LogRecord_Level } from "./generated/mesh"; | ||
/** | ||
* Logging level for the application | ||
*/ | ||
static debugMode = LogRecord_Level.WARNING; | ||
/** | ||
* Sets the library-wide logging level | ||
@@ -19,6 +23,2 @@ * @param level Desired level of logging | ||
} | ||
/** | ||
* Logging level for the application | ||
*/ | ||
SettingsManager.debugMode = LogRecord_Level.WARNING; | ||
//# sourceMappingURL=settingsmanager.js.map |
{ | ||
"name": "@meshtastic/meshtasticjs", | ||
"version": "0.6.12", | ||
"version": "0.6.13", | ||
"description": "Browser library for interfacing with meshtastic devices", | ||
"license": "GPL-3.0-only", | ||
"sideEffects": false, | ||
@@ -22,21 +23,18 @@ "type": "module", | ||
"dependencies": { | ||
"@protobuf-ts/runtime": "^2.0.0-alpha.21", | ||
"rxjs": "^6.6.7" | ||
"@protobuf-ts/runtime": "^2.0.0-alpha.25", | ||
"rxjs": "^7.1.0" | ||
}, | ||
"devDependencies": { | ||
"@protobuf-ts/plugin": "^1.0.13", | ||
"@types/jest": "^26.0.23", | ||
"@types/w3c-web-serial": "^1.0.1", | ||
"@types/web-bluetooth": "0.0.9", | ||
"@typescript-eslint/eslint-plugin": "^4.22.0", | ||
"@typescript-eslint/parser": "^4.22.0", | ||
"eslint": "^7.25.0", | ||
"@typescript-eslint/eslint-plugin": "^4.25.0", | ||
"@typescript-eslint/parser": "^4.25.0", | ||
"eslint": "^7.27.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-prettier": "^3.4.0", | ||
"jest": "^26.6.3", | ||
"pre-commit": "^1.2.2", | ||
"prettier": "^2.2.1", | ||
"ts-jest": "^26.5.5", | ||
"prettier": "^2.3.0", | ||
"typedoc": "^0.20.36", | ||
"typescript": "^4.2.4" | ||
"typescript": "^4.3.2" | ||
}, | ||
@@ -69,4 +67,3 @@ "scripts": { | ||
} | ||
], | ||
"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
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
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
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
486790
12
7827
+ Addedrxjs@7.8.1(transitive)
+ Addedtslib@2.8.1(transitive)
- Removedrxjs@6.6.7(transitive)
- Removedtslib@1.14.1(transitive)
Updatedrxjs@^7.1.0