storing metadata now too

master
cheetah 4 years ago
parent a5c4a44987
commit 0498591e4a

@ -35,6 +35,11 @@ class BirdySlim extends PagerDevice {
longitude: data.longitude, 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) { switch (data.type) {
case 'ack': { case 'ack': {
@ -49,11 +54,12 @@ class BirdySlim extends PagerDevice {
require('../MessageManager').respondToMessage(data.msgid, data.operationalData) require('../MessageManager').respondToMessage(data.msgid, data.operationalData)
break; 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, { require('../MessageManager').attachMetadata(data.msgid, {
ack: data.ack, ack: data.ack,
rssi: data.rssi, rssi: data.rssi,
date: data.date date: data.date,
metadata: data.metadata,
}) })
} }
break; break;

Loading…
Cancel
Save