feat(ook): add timing presets, RSSI, bit-order suggest, pattern filter, TSCM link

- Timing presets: five quick-fill buttons (300/600, 300/900, 400/800, 500/1500, 500 MC)
  that populate all six pulse-timing fields at once — maps to CTF flag timing profiles
- RSSI per frame: add -M level to rtl_433 command; parse snr/rssi/level from JSON;
  display dB SNR inline with each frame; include rssi_db column in CSV export
- Auto bit-order suggest: "Suggest" button counts printable chars across all stored
  frames for MSB vs LSB, selects the winner, shows count — no decoder restart needed
- Pattern filter: live hex/ASCII filter input above the frame log; hides non-matching
  frames and highlights matches in green; respects current bit order
- TSCM integration: "Decode (OOK)" button in RF signal device details panel switches
  to OOK mode and pre-fills frequency — frontend-only, no backend changes needed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
thatsatechnique
2026-03-04 11:51:39 -08:00
parent 4c282bb055
commit 0c3ccac21c
5 changed files with 157 additions and 8 deletions

View File

@@ -126,6 +126,17 @@ def ook_parser_thread(
if raw_data:
codes = [str(raw_data)]
# Extract signal level if rtl_433 was invoked with -M level
rssi: float | None = None
for _rssi_key in ('snr', 'rssi', 'level', 'noise'):
_rssi_val = data.get(_rssi_key)
if _rssi_val is not None:
try:
rssi = round(float(_rssi_val), 1)
except (TypeError, ValueError):
pass
break
if not codes:
logger.debug(
f'[rtl_433/ook] no code field — keys: {list(data.keys())}'
@@ -176,7 +187,7 @@ def ook_parser_thread(
continue
try:
output_queue.put_nowait({
event: dict[str, Any] = {
'type': 'ook_frame',
'hex': frame['hex'],
'bits': frame['bits'],
@@ -185,7 +196,10 @@ def ook_parser_thread(
'inverted': inverted,
'encoding': encoding,
'timestamp': timestamp,
})
}
if rssi is not None:
event['rssi'] = rssi
output_queue.put_nowait(event)
except queue.Full:
pass