From 0498591e4afff50da784efa6b00dfc07eb1e9357 Mon Sep 17 00:00:00 2001 From: cheetah Date: Mon, 29 Mar 2021 22:12:31 +0000 Subject: [PATCH] storing metadata now too --- types/devices/BirdySlim.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/types/devices/BirdySlim.js b/types/devices/BirdySlim.js index cb91d85..688b4ab 100644 --- a/types/devices/BirdySlim.js +++ b/types/devices/BirdySlim.js @@ -35,6 +35,11 @@ class BirdySlim extends PagerDevice { longitude: data.longitude, }, } + stateSet.lastLoRaPacket = data.metadata + /*if (!!data.metadata && !!data.metadata.uplink_message.rx_metadata) { + const rx_metadata = data.metadata.uplink_message.rx_metadata + + }*/ switch (data.type) { case 'ack': { @@ -49,11 +54,12 @@ class BirdySlim extends PagerDevice { require('../MessageManager').respondToMessage(data.msgid, data.operationalData) break; } - // If we have had a Ack. Event, we should store some Metadate about it too + // If we have had a Ack. Event, we should store some Metadata about it too require('../MessageManager').attachMetadata(data.msgid, { ack: data.ack, rssi: data.rssi, - date: data.date + date: data.date, + metadata: data.metadata, }) } break;