hil: clock-quality gate in meter_anchored, soak recovers on any failed segment
This commit is contained in:
@@ -98,6 +98,13 @@ def main():
|
||||
anchors = np.array([r["timestamp_us"] / 1000.0 for r in strong])
|
||||
span = len(db)
|
||||
off, matched, err = fit_clock(bursts, anchors, span)
|
||||
# A broken clock (sample drops, dongle stalls) makes every TX window
|
||||
# meaningless. Reject rather than emit garbage.
|
||||
if matched < max(5, len(strong) * 0.6) or err > 5.0:
|
||||
print(f"clock fit unusable: {matched}/{len(strong)} anchors, "
|
||||
f"median err {err:.1f} ms -- IQ stream integrity suspect",
|
||||
file=sys.stderr)
|
||||
sys.exit(3)
|
||||
|
||||
bst = np.array([b[0] for b in bursts], dtype=float)
|
||||
meter_lv = []
|
||||
|
||||
Reference in New Issue
Block a user