PTZ — журнал продолжения same_native
#6
Open
YaroslavKartashov
wants to merge 1 commits from feature/ptz-same-native-diagnostics into feature/ptz-native-floor-continuation
@ -1,2 +1,3 @@
|
|||||||
integration/ptz_zoom_zero_decision/server.patch text eol=lf -whitespace
|
integration/ptz_zoom_zero_decision/server.patch text eol=lf -whitespace
|
||||||
integration/ptz_native_floor_continuation/server.patch text eol=lf -whitespace
|
integration/ptz_native_floor_continuation/server.patch text eol=lf -whitespace
|
||||||
|
integration/ptz_same_native_diagnostics/server.patch text eol=lf -whitespace
|
||||||
|
|||||||
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"requires": "PR #5",
|
||||||
|
"files": {
|
||||||
|
"ptz_tracker_modular/postprocess.py": {
|
||||||
|
"before": "376f705fb3be06ab04afc1ebb718cb71a2c27a67987023b099f5d921148b64ad",
|
||||||
|
"after": "d85439504ebf56fc39ee8a883c44b1bfc6db721df938aedc85d6c6484cb97776"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"unchanged": {
|
||||||
|
"ptz_tracker_modular/ptz_io.py": "13d31539193b1a773a5d1db2187cc2a0c8db67d0aacaad89082face64df07499"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
--- a/ptz_tracker_modular/postprocess.py
|
||||||
|
+++ b/ptz_tracker_modular/postprocess.py
|
||||||
|
@@ -4577,6 +4577,7 @@
|
||||||
|
pulse_timing: Tuple[float, float] | None = None,
|
||||||
|
optics_observed_now: float | None = None,
|
||||||
|
stop_trace: list[str] | None = None,
|
||||||
|
+ continuation_trace: list[tuple[int, int, float, float, float, float, float]] | None = None,
|
||||||
|
) -> float:
|
||||||
|
"""Break continuous zoom-in into short feedback-controlled steps."""
|
||||||
|
pulse_until = float(st.get("zoom_step_until", 0.0) or 0.0)
|
||||||
|
@@ -4650,6 +4651,12 @@
|
||||||
|
):
|
||||||
|
_finish_zoom_step(st, now, stable_key=stable_key)
|
||||||
|
return _reject_zoom_step("pending_native_floor", stop_trace)
|
||||||
|
+ if same_native and continuation_trace is not None:
|
||||||
|
+ continuation_trace.append((
|
||||||
|
+ st["ptz_generation"], native, float(zoom_cmd), useful_cmd, pulse_until,
|
||||||
|
+ float(st.get("zoom_step_pending_pulse_sec", 0.0) or 0.0),
|
||||||
|
+ float(st.get("zoom_step_pending_hard_sec", 0.0) or 0.0),
|
||||||
|
+ ))
|
||||||
|
zoom_cmd = useful_cmd
|
||||||
|
physical_started = float(st.get("zoom_step_physical_started_at", 0.0) or 0.0)
|
||||||
|
if physical_started > 0.0:
|
||||||
|
@@ -9232,6 +9239,7 @@
|
||||||
|
st["zoom_useful_pulse_reason"] = "wait_response_framing"
|
||||||
|
zoom_zero_reason = "response_framing"
|
||||||
|
gate_stop = [] if decision_request else None
|
||||||
|
+ continuation_trace = [] if decision_request else None
|
||||||
|
zoom_cmd = _gate_zoom_in_pulse(
|
||||||
|
st,
|
||||||
|
# Keep new-request expiry tied to the frame that authorized
|
||||||
|
@@ -9247,6 +9255,7 @@
|
||||||
|
pulse_timing=response_timing,
|
||||||
|
optics_observed_now=zoom_gate_now,
|
||||||
|
stop_trace=gate_stop,
|
||||||
|
+ continuation_trace=continuation_trace,
|
||||||
|
)
|
||||||
|
if gate_stop:
|
||||||
|
zoom_zero_reason = gate_stop[-1]
|
||||||
|
@@ -9788,6 +9797,15 @@
|
||||||
|
cam_idx, prepared_fps, visual_only, max(0., time.time()-now)*1000.,
|
||||||
|
st.get('control_updates', 0), st.get('control_visual_updates', 0))
|
||||||
|
ingest_detection(alarm_eligible)
|
||||||
|
+ if continuation_trace:
|
||||||
|
+ generation, native, proposed, held, until, pulse_sec, hard_sec = continuation_trace[0]
|
||||||
|
+ logger.info(
|
||||||
|
+ "[ZOOM CONTINUE] cam=%s frame=%s request=%s gen=%s reason=same_native "
|
||||||
|
+ "native=%s proposed=%.12g held=%.12g nominal_until=%.6f "
|
||||||
|
+ "pulse=%.3fs hard=%.3fs dispatch_zoom=%.12g",
|
||||||
|
+ cam_idx, source_seq, decision_request, generation, native, proposed,
|
||||||
|
+ held, until, pulse_sec, hard_sec, zoom_cmd,
|
||||||
|
+ )
|
||||||
|
return
|
||||||
|
|
||||||
|
# =========================
|
||||||
Loading…
Reference in New Issue