mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
log raw lora bytes received
This commit is contained in:
parent
5d94ba88ee
commit
0270c74293
4 changed files with 20 additions and 9 deletions
|
|
@ -273,6 +273,8 @@ class Connection extends EventEmitter {
|
|||
this.onLoginSuccessPush(bufferReader);
|
||||
} else if(responseCode === Constants.PushCodes.StatusResponse){
|
||||
this.onStatusResponsePush(bufferReader);
|
||||
} else if(responseCode === Constants.PushCodes.LogRxData){
|
||||
this.onLogRxDataPush(bufferReader);
|
||||
} else {
|
||||
console.log("unhandled frame", frame);
|
||||
}
|
||||
|
|
@ -319,6 +321,14 @@ class Connection extends EventEmitter {
|
|||
});
|
||||
}
|
||||
|
||||
onLogRxDataPush(bufferReader) {
|
||||
this.emit(Constants.PushCodes.LogRxData, {
|
||||
lastSnr: bufferReader.readInt8() / 4,
|
||||
lastRssi: bufferReader.readInt8(),
|
||||
raw: bufferReader.readRemainingBytes(),
|
||||
});
|
||||
}
|
||||
|
||||
onOkResponse(bufferReader) {
|
||||
this.emit(Constants.ResponseCodes.Ok, {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue