mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
add ability to set advert lat lon
This commit is contained in:
parent
581e159f0d
commit
54df5ed9c3
3 changed files with 17 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ class Constants {
|
|||
SyncNextMessage: 10, // done
|
||||
SetRadioParams: 11, // done
|
||||
SetTxPower: 12, // done
|
||||
SetAdvertLatLon: 14,
|
||||
}
|
||||
|
||||
static ResponseCodes = {
|
||||
|
|
|
|||
|
|
@ -166,6 +166,14 @@ class Device {
|
|||
await this.sendToRadioFrame(data.toBytes());
|
||||
}
|
||||
|
||||
async sendCommandSetAdvertLatLon(lat, lon) {
|
||||
const data = new BufferWriter();
|
||||
data.writeByte(Constants.CommandCodes.SetAdvertLatLon);
|
||||
data.writeUInt32LE(lat);
|
||||
data.writeUInt32LE(lon);
|
||||
await this.sendToRadioFrame(data.toBytes());
|
||||
}
|
||||
|
||||
async readLoop() {
|
||||
try {
|
||||
while(true){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue