diff --git a/hil/correlate.py b/hil/correlate.py index 38ee619..6db6553 100755 --- a/hil/correlate.py +++ b/hil/correlate.py @@ -191,7 +191,7 @@ def main(): verified_repeats += 1 rep["verified"] = True - tx_ok = [t for t in heltec_tx if t.get("result") == "ok"] + tx_ok = [t for t in heltec_tx if str(t.get("result", "")).startswith("ok")] delays = [r["dt"] * 1000 for r in repeats] delays.sort() diff --git a/hil/run.sh b/hil/run.sh index 8acdc99..50dce3d 100755 --- a/hil/run.sh +++ b/hil/run.sh @@ -143,7 +143,9 @@ $PY hil/correlate.py --serial "$RUN_DIR/serial.log" --sdr "$RUN_DIR/rtlwmbus.log # --- 15. lockup / reset detection ----------------------------------------- HB=$(grep -c '"event":"heartbeat"' "$RUN_DIR/serial.log" || true) -EXPECTED_HB=$((DURATION / 10 - 2)) +# heartbeats are emitted at >= 10 s cadence (the radio task also does RX/TX +# work between them), so allow slack; this catches real stalls, not drift. +EXPECTED_HB=$((DURATION / 14)) if [ "$HB" -lt "$EXPECTED_HB" ]; then echo "WARNING: only $HB heartbeats (expected >= $EXPECTED_HB) - possible lockup" \ | tee "$RUN_DIR/lockup_warning.txt"