ignore packets we don't want to see for now

This commit is contained in:
liamcottle
2024-03-13 15:18:05 +13:00
parent 9344d9d6e7
commit ffdf735f82

View File

@ -96,7 +96,7 @@ client.on("message", async (topic, message) => {
}
const logKnownPacketTypes = false;
const logUnknownPacketTypes = false;
const logUnknownPacketTypes = true;
const portnum = envelope.packet?.decoded?.portnum;
if(portnum === 3) {
@ -299,7 +299,19 @@ client.on("message", async (topic, message) => {
else {
if(logUnknownPacketTypes){
// ignore packets we don't want to see for now
if(portnum === undefined // ignore failed to decrypt
|| portnum === 1 // ignore TEXT_MESSAGE_APP
|| portnum === 34 // ignore PAXCOUNTER_APP
|| portnum === 65 // ignore STORE_FORWARD_APP
|| portnum === 66 // ignore RANGE_TEST_APP
){
return;
}
console.log(portnum, envelope);
}
}