Update HIL verification for hop-marked repeats
This commit is contained in:
+11
-3
@@ -33,15 +33,23 @@ for i in $(seq 1 "$SEGS"); do
|
||||
V=$(./result-py/bin/python3 hil/meter_anchored.py \
|
||||
--iq "$D/iq.raw" --serial "$D/serial.log" --json 2>"$D/verdict.err")
|
||||
RC=$?
|
||||
STATE=""
|
||||
if [ -n "$V" ]; then
|
||||
echo "$V" | ./result-py/bin/python3 -c \
|
||||
STATE=$(printf '%s\n' "$V" | ./result-py/bin/python3 -c \
|
||||
"import json,sys; print(json.load(sys.stdin).get('rf_state','unknown'))")
|
||||
printf '%s\n' "$V" | ./result-py/bin/python3 -c \
|
||||
"import json,sys,time; d=json.load(sys.stdin); d['seg']=$i; d['rc']=$RC; d['t']=int(time.time()); print(json.dumps(d))" \
|
||||
>> "$OUT/soak.jsonl"
|
||||
else
|
||||
echo "{\"seg\":$i,\"rc\":$RC,\"error\":\"no_verdict\",\"t\":$(date +%s)}" >> "$OUT/soak.jsonl"
|
||||
fi
|
||||
# keep disk bounded: drop IQ after verdict, keep serial
|
||||
rm -f "$D/iq.raw"
|
||||
# Strong segments are summarized and discarded. Retain every weak,
|
||||
# absent, or unclassified segment so a hardware conclusion is auditable.
|
||||
if [ "$STATE" = "strong" ] && [ "$RC" = "0" ]; then
|
||||
rm -f "$D/iq.raw"
|
||||
else
|
||||
echo "{\"seg\":$i,\"note\":\"iq_retained\",\"rf_state\":\"$STATE\",\"t\":$(date +%s)}" >> "$OUT/soak.jsonl"
|
||||
fi
|
||||
if grep -q "lost at least" "$D/rtl_sdr.err" 2>/dev/null; then
|
||||
echo "{\"seg\":$i,\"note\":\"sample_drops\",\"t\":$(date +%s)}" >> "$OUT/soak.jsonl"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user