add ability to reset path

This commit is contained in:
liamcottle 2025-02-11 18:01:22 +13:00
parent 8bf65ea11f
commit fba9eb63c7
3 changed files with 15 additions and 0 deletions

View file

@ -18,6 +18,7 @@ class Constants {
SyncNextMessage: 10,
SetRadioParams: 11,
SetTxPower: 12,
ResetPath: 13,
SetAdvertLatLon: 14,
RemoveContact: 15,
}

View file

@ -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);