Skip to content

Commit

Permalink
Changing peers to nodes. This is inline with both the Android and iOS… (
Browse files Browse the repository at this point in the history
#81)

* Changing peers to nodes. This is inline with both the Android and iOS Apps.

* Update node rest message from nodes to nodedb

* bump package version

* bump package version
  • Loading branch information
davidlpower authored Mar 15, 2024
1 parent 3971583 commit e2bf240
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions jsr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@meshtastic/js",
"version": "2.2.24-0",
"version": "2.2.24-1",
"exports": "./src/mod.ts"
}
}
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshtastic/js",
"version": "2.2.24-0",
"version": "2.2.24-1",
"description": "Browser library for interfacing with meshtastic devices",
"license": "GPL-3.0-only",
"scripts": {
Expand All @@ -23,9 +23,7 @@
"types": "./dist/index.d.ts"
}
},
"files": [
"dist"
],
"files": ["dist"],
"bugs": {
"url": "https://github.com/meshtastic/js/issues"
},
Expand Down
10 changes: 5 additions & 5 deletions src/meshDevice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,21 +513,21 @@ export abstract class MeshDevice {
* Resets the internal NodeDB of the radio, usefull for removing old nodes
* that no longer exist.
*/
public async resetPeers(): Promise<number> {
public async resetNodes(): Promise<number> {
this.log.debug(
Types.Emitter[Types.Emitter.ResetPeers],
"📻 Resetting Peers",
Types.Emitter[Types.Emitter.ResetNodes],
"📻 Resetting NodeDB",
);

const resetPeers = new Protobuf.Admin.AdminMessage({
const resetNodes = new Protobuf.Admin.AdminMessage({
payloadVariant: {
case: "nodedbReset",
value: 1,
},
});

return await this.sendPacket(
resetPeers.toBinary(),
resetNodes.toBinary(),
Protobuf.Portnums.PortNum.ADMIN_APP,
"self",
);
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export enum Emitter {
WriteToRadio = 23,
SetDebugMode = 24,
GetMetadata = 25,
ResetPeers = 26,
ResetNodes = 26,
Shutdown = 27,
Reboot = 28,
RebootOta = 29,
Expand Down

0 comments on commit e2bf240

Please sign in to comment.