mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
add ability to reset path
This commit is contained in:
parent
8bf65ea11f
commit
fba9eb63c7
3 changed files with 15 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ class Constants {
|
|||
SyncNextMessage: 10,
|
||||
SetRadioParams: 11,
|
||||
SetTxPower: 12,
|
||||
ResetPath: 13,
|
||||
SetAdvertLatLon: 14,
|
||||
RemoveContact: 15,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,6 +166,13 @@ class Device {
|
|||
await this.sendToRadioFrame(data.toBytes());
|
||||
}
|
||||
|
||||
async sendCommandResetPath(pubKey) {
|
||||
const data = new BufferWriter();
|
||||
data.writeByte(Constants.CommandCodes.ResetPath);
|
||||
data.writeBytes(pubKey); // 32 bytes
|
||||
await this.sendToRadioFrame(data.toBytes());
|
||||
}
|
||||
|
||||
async sendCommandSetAdvertLatLon(lat, lon) {
|
||||
const data = new BufferWriter();
|
||||
data.writeByte(Constants.CommandCodes.SetAdvertLatLon);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue