From 6d451a5c3e4e97f9350e0a5e21416894465822cc Mon Sep 17 00:00:00 2001 From: you Date: Mon, 23 Mar 2026 22:56:35 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20grouped=20packets=20include=20route=5Fty?= =?UTF-8?q?pe,=20snr,=20rssi=20=E2=80=94=20needed=20for=20packet=20filter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit queryGrouped was missing route_type, snr, rssi fields. The packet filter language couldn't filter by route/snr/rssi since grouped packets didn't have those fields. --- packet-store.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packet-store.js b/packet-store.js index c53873ad..3506a4fa 100644 --- a/packet-store.js +++ b/packet-store.js @@ -591,9 +591,12 @@ class PacketStore { observer_name: tx.observer_name, path_json: tx.path_json, payload_type: tx.payload_type, + route_type: tx.route_type, raw_hex: tx.raw_hex, decoded_json: tx.decoded_json, observation_count: tx.observation_count, + snr: tx.snr, + rssi: tx.rssi, })).sort((a, b) => b.latest.localeCompare(a.latest)); const total = sorted.length; @@ -696,8 +699,8 @@ class PacketStore { const sql = `SELECT hash, COUNT(*) as count, COUNT(DISTINCT observer_id) as observer_count, MAX(timestamp) as latest, MIN(observer_id) as observer_id, MIN(observer_name) as observer_name, - MIN(path_json) as path_json, MIN(payload_type) as payload_type, MIN(raw_hex) as raw_hex, - MIN(decoded_json) as decoded_json + MIN(path_json) as path_json, MIN(payload_type) as payload_type, MIN(route_type) as route_type, + MIN(raw_hex) as raw_hex, MIN(decoded_json) as decoded_json, MIN(snr) as snr, MIN(rssi) as rssi FROM packets_v ${w} GROUP BY hash ORDER BY latest DESC LIMIT ? OFFSET ?`; const packets = this.db.prepare(sql).all(...params, limit, offset);