Measure fresh ISAPI status during TRACK on all six PTZ cameras #12

Open
YaroslavKartashov wants to merge 2 commits from feature/ptz-field-status-sampling into feature/ptz-offline-field-calibration

1
.gitattributes vendored

@ -4,3 +4,4 @@ integration/ptz_same_native_diagnostics/server.patch text eol=lf -whitespace
integration/ptz_zoom_threshold_diagnostics/server.patch text eol=lf -whitespace
integration/ptz_predictive_zoom/server.patch text eol=lf -whitespace
integration/ptz_predictive_zoom/*.py text eol=lf
integration/ptz_field_sampling/status.patch text eol=lf -whitespace

@ -11,7 +11,7 @@ from pathlib import Path
from statistics import median
EVENTS = {"tick", "first_zoom", "stop", "native10_pulse_calibration", "zoom_block_summary"}
EVENTS = {"tick", "first_zoom", "stop", "native10_pulse_calibration", "zoom_block_summary", "status_sample"}
PULSE = "native10_pulse_calibration"
FULL_SWEEP_LOG_RATE = math.log(252 / 6) / 5.5
# Published PR8 replay coefficients carried by PR10. Keys are internal camera IDs.
@ -136,6 +136,30 @@ def status_samples(ticks):
return samples
def cadence(times):
ordered = sorted(set(times))
gaps = [(b - a) * 1000 for a, b in zip(ordered, ordered[1:])]
return {"samples": len(ordered), "hz": 1000 * len(gaps) / sum(gaps) if gaps else None,
"gap_ms": stats(gaps)}
def settled_band_bracket(samples, before, first, after, stop, stop_ack):
"""ISAPI sample interval bracketing entry into the final 0.10° band."""
series = {at: [hfov] for at, hfov in (before, first, after)}
for at, values in samples.items():
if before[0] <= at <= after[0]:
series.setdefault(at, []).extend(values)
if any(max(values) - min(values) > .10 for values in series.values()):
return None
ordered = sorted((at, median(values)) for at, values in series.items())
outside = [i for i, (_, hfov) in enumerate(ordered) if abs(hfov - after[1]) > .10 + 1e-9]
if not outside:
return None
lower, upper = ordered[outside[-1]][0], ordered[outside[-1] + 1][0]
return {"from_stop_issue_ms": [max(0., (at - stop) * 1000) for at in (lower, upper)],
"from_stop_ack_ms": [max(0., (at - stop_ack) * 1000) for at in (lower, upper)]}
def analyze_pulse(row, stops, samples, limits):
before, at_stop, first, after = (fov(row, k) for k in
("HFOV_before", "HFOV_stop_sample", "HFOV_first_post_stop", "HFOV_after"))
@ -202,7 +226,7 @@ def analyze_pulse(row, stops, samples, limits):
"effective_log_rate_s": None, "effective_hfov_narrowing_deg_s": None,
"pre_stop_log_rate_s": None, "pre_stop_hfov_narrowing_deg_s": None,
"post_stop_tail_deg": None, "stop_bracket_narrowing_deg": None,
"stop_bracket_log_narrowing": None}
"stop_bracket_log_narrowing": None, "settled_band_0_10deg_bracket": None}
if reasons:
return result
rise = focal(at_stop) - focal(before)
@ -214,6 +238,8 @@ def analyze_pulse(row, stops, samples, limits):
post_stop_tail_deg=max(0., first - after),
stop_bracket_narrowing_deg=max(0., at_stop - after),
stop_bracket_log_narrowing=max(0., focal(after) - focal(at_stop)),
settled_band_0_10deg_bracket=settled_band_bracket(
samples, (stop_sample, at_stop), (first_post, first), (after_at, after), stop, stop_ack),
)
return result
@ -252,7 +278,14 @@ def episode_report(owner, rows, limits):
for row in rows:
by_event[row["event"]].append(row)
ticks = sorted(by_event["tick"], key=lambda row: row["utc"])
statuses = status_samples(ticks)
poll_rows = by_event["status_sample"]
fresh_rows = [row for row in poll_rows if row.get("optics_fresh") is True
and fov(row, "FOV_actual") is not None and val(row, "FOV_status_utc") is not None]
statuses = status_samples([*ticks, *fresh_rows])
frame_times = [at for row in ticks if (at := val(row, "frame_utc")) is not None
and 0 < at <= row["utc"]]
frame_ages = [(row["utc"] - at) * 1000 for row in ticks
if (at := val(row, "frame_utc")) is not None and 0 < at <= row["utc"]]
stops = defaultdict(list)
for row in by_event["stop"]:
stops[row.get("request")].append(row)
@ -318,6 +351,15 @@ def episode_report(owner, rows, limits):
"t_to_first_zoom_s": first / 1000 if first is not None else None,
"t_to_first_observed_pulse_s": first / 1000 if first is not None else ack - start if ack is not None else None,
"min_hfov_deg": min(observed_hfov, default=None),
"isapi_track_status": {
"published": len(poll_rows),
"success": sum(row.get("status_ok") is True for row in poll_rows),
"request_ms": stats([val(row, "request_ms") for row in poll_rows]),
"successful_status": cadence(row["utc"] for row in poll_rows if row.get("status_ok") is True),
"fresh_optics": cadence(row["FOV_status_utc"] for row in fresh_rows),
},
"control_sampled_frame_cadence": cadence(frame_times),
"control_sampled_frame_age_ms": stats(frame_ages),
"tele_observed_s": tele_s, "tele_center_fraction": None, "tele_center_covered_s": 0.,
"min_independently_measured_edge_margin": None,
"tele_center_availability": "PR10 ticks omit target center coordinates",
@ -441,6 +483,13 @@ def range_report(pulses, profile):
"pre_stop_hfov_narrowing_deg_s", "post_stop_tail_deg", "stop_bracket_narrowing_deg",
"stop_bracket_log_narrowing", "put_rtt_ms", "stop_rtt_ms"):
result[key] = stats(p[key] for p in accepted)
for reference in ("from_stop_issue_ms", "from_stop_ack_ms"):
windows = [p["settled_band_0_10deg_bracket"][reference] for p in accepted
if p["settled_band_0_10deg_bracket"] is not None]
result["settled_band_0_10deg_" + reference] = {
"lower": stats(window[0] for window in windows),
"upper": stats(window[1] for window in windows),
}
if profile is not None:
nominal, upper = (profile[key] * FULL_SWEEP_LOG_RATE for key in ("nominal_gain", "upper_gain"))
median_observed = result["effective_log_rate_s"]["p50"]
@ -602,7 +651,21 @@ def markdown(report, candidate):
if ep["classification"] in ("no_positive_ack_observed", "early_stop", "incomplete_observation"):
reasons = ", ".join(f"{reason} ({count})" for reason, count in ep["top_block_reasons"]) or "сводки нет"
lines.append(f'- PTZ{ep["camera"]}, TRACK {ep["track_start_utc"]:.3f} · {reasons}')
lines += ["", "## Отклик оптики и RTT", "",
lines += ["", "## Частота статуса во время TRACK", "",
"| Камера | TRACK UTC (Unix s) | Свежий HFOV, Гц | Интервал HFOV p95 / max, мс | "
"Ответ статуса p95, мс | Интервал / возраст кадров в TRACK p95, мс |",
"|---|---:|---:|---:|---:|---:|"]
for ep in report["episodes"]:
status = ep["isapi_track_status"]
optics = status["fresh_optics"]
lines.append(f'| PTZ{ep["camera"]} | {ep["track_start_utc"]:.3f} | '
f'{md_number(optics["hz"])} | {md_number(optics["gap_ms"]["p95"])} / '
f'{md_number(optics["gap_ms"]["max"])} | {md_number(status["request_ms"]["p95"])} | '
f'{md_number(ep["control_sampled_frame_cadence"]["gap_ms"]["p95"])} / '
f'{md_number(ep["control_sampled_frame_age_ms"]["p95"])} |')
lines += ["", "Интервал кадров рассчитан по кадрам, дошедшим до контроллера. "
"Для оценки джиттера всего видеопотока нужны метки времени исходных кадров.", "",
"## Отклик оптики и RTT", "",
"| Камера | Native | Диапазон HFOV | Принято / завершено | До STOP, °/с (медиана) | "
"Хвост после STOP, ° (макс.) | Верхняя граница скобки STOP, ° (макс.) | RTT PUT / STOP p95, мс |",
"|---|---:|---|---:|---:|---:|---:|---:|"]
@ -617,7 +680,9 @@ def markdown(report, candidate):
f'{md_number(value["completed_stop_rtt_ms"]["p95"])} |')
lines += ["", "Скорость до STOP оценивается по статусу от PUT до последнего замера перед STOP. "
"Остаточное сужение от первого замера после STOP даёт нижнюю оценку. "
"Интервал от последнего замера до STOP даёт верхнюю наблюдаемую скобку при монотонном движении.", "",
"Интервал от последнего замера до STOP даёт верхнюю наблюдаемую скобку при монотонном движении. "
"В JSON также приведены интервалы входа HFOV в полосу 0,10° от установившегося значения, "
"отсчитанные от отправки STOP и от ACK. Частота ISAPI и задержка сети ограничивают точность этого замера.", "",
"## Следующий предел HFOV", ""]
for camera, row in candidate["cameras"].items():
f = row["next_floor_review"]

@ -67,6 +67,21 @@ def write(path, rows):
class CalibrationTests(unittest.TestCase):
def test_poll_cadence_counts_fresh_optics_separately_from_cache(self):
rows = episode()
for i in range(5):
now = 1000.5 + .08 * i
rows.append(envelope(8, 1000., "status_sample", now, request_ms=40.,
status_ok=True, FOV_actual=13.,
FOV_status_utc=now if i != 2 else now-.08, optics_fresh=i != 2))
report, _ = run(rows)
status = report["episodes"][0]["isapi_track_status"]
self.assertEqual(status["success"], 5)
self.assertEqual(status["fresh_optics"]["samples"], 4)
self.assertAlmostEqual(status["successful_status"]["hz"], 12.5)
self.assertAlmostEqual(status["fresh_optics"]["gap_ms"]["max"], 160.)
self.assertEqual(status["request_ms"]["p95"], 40.)
def test_recovers_rate_tail_rtt_and_bounded_lower_profile(self):
report, candidate = run(sum((episode(start=1000.+i*10) for i in range(3)), []))
camera = candidate["cameras"]["19"]
@ -81,6 +96,12 @@ class CalibrationTests(unittest.TestCase):
self.assertAlmostEqual(bins["effective_log_rate_s"]["p50"],expected)
self.assertAlmostEqual(bins["pre_stop_hfov_narrowing_deg_s"]["p50"],3.)
self.assertAlmostEqual(bins["post_stop_tail_deg"]["p95"],.10)
stop_window = bins["settled_band_0_10deg_from_stop_issue_ms"]
self.assertEqual(stop_window["lower"]["p50"], 0.)
self.assertAlmostEqual(stop_window["upper"]["p50"], 80.)
ack_window = bins["settled_band_0_10deg_from_stop_ack_ms"]
self.assertAlmostEqual(ack_window["upper"]["p50"], 30.)
self.assertAlmostEqual(report["episodes"][0]["control_sampled_frame_age_ms"]["p95"], 100.)
self.assertAlmostEqual(bins["stop_bracket_narrowing_deg"]["max"],.30)
self.assertEqual(bins["put_rtt_ms"]["p95"],40.)
self.assertEqual(bins["stop_rtt_ms"]["p95"],50.)

@ -0,0 +1,14 @@
# Сбор статуса ISAPI во время TRACK
Дополнительный патч применяется к материализованному `status.py` PR №10 с контрольной суммой из `pins.json`. Он добавляет параметр `ptz_status_track_hz` в существующую запись каждой камеры в `cameras.toml`. Значение 15 задаёт целевую частоту в TRACK для PTZ11, PTZ13, PTZ15, PTZ17, PTZ19 и PTZ21. Допустимый диапазон 10–15 Гц. В остальных режимах действует исходный `PTZ_STATUS_HZ`.
Поллер по-прежнему допускает один запрос в работе на камеру. Пропущенные периоды пропускаются. Для EMA скорости при повышенной частоте сохраняется временная постоянная исходного поллера. Настройки предсказательного зума и параметры импульсов задаются прежним способом.
В JSONL эпизода появляются события `status_sample` с временем ответа, HFOV, временем оптического замера и признаком `optics_fresh`. Запоздалый ответ не атрибутируется следующему TRACK. Отчёт PR №11 разделяет частоту успешных статусов и частоту свежих замеров оптики, выводит p95 и максимальный интервал. Заданный темп запросов сам по себе не гарантирует частоту свежего HFOV.
В коротком последовательном GET-тесте на объекте в существующей сети медианные интервалы свежих статусов составляли около 100 мс. На PTZ15 средняя частота составила 9,80 Гц, отдельный интервал достиг 286 мс. Замеры выполнялись отдельным читающим процессом. Рабочий поллер тогда был настроен на 4 Гц.
```powershell
python integration/ptz_field_sampling/test_status_sampling.py C:/path/to/pr10/status.py -v
python -m unittest discover -s integration/ptz_field_calibration -v
```

@ -0,0 +1,6 @@
{
"status.py": {
"before": "0f0b91414e04eedc547a5e6931825974f9b5bc09d5795babe5c6ac6179f0882d",
"after": "815dee066d46031984b6bb77b0f6974c8b6c77b786f7a94a5ad2eb117bee039e"
}
}

@ -0,0 +1,129 @@
--- a/status.py
+++ b/status.py
@@ -14,7 +14,7 @@
# ---------------- Публичные утилиты статуса ----------------
-from .zoom_controller import observe_calibration
+from .zoom_controller import _episode_telemetry, _owner, observe_calibration
def get_cached_angles(cam_id: int) -> Tuple[Optional[float], Optional[float], Optional[float]]:
@@ -97,6 +97,13 @@
rate_alpha = clipf(float(getattr(config, "PTZ_RATE_EMA_ALPHA", 0.40)), 0.02, 1.0)
+ pan_alpha = tilt_alpha = rate_alpha
+ if _track_status_period(cfg, st) is not None:
+ # Preserve the previous time constant at the faster TRACK cadence.
+ baseline_hz = max(0.1, float(getattr(config, "PTZ_STATUS_HZ", 4.0)))
+ pan_alpha = 1 - (1 - rate_alpha) ** (max(0.0, pan_sample_dt) * baseline_hz)
+ tilt_alpha = 1 - (1 - rate_alpha) ** (max(0.0, tilt_sample_dt) * baseline_hz)
+
if pan is not None:
pan_n = float(pan) % 360.0
if isinstance(previous_pan, (int, float)) and 0.03 <= pan_sample_dt <= 2.0:
@@ -104,7 +111,7 @@
pan_limit = float(cfg.get("ptz_pan_max_speed_deg_s", getattr(config, "AIM_PAN_SPEED_DEG_S", 160.0)))
if abs(raw_rate) <= max(1.0, pan_limit * 1.35):
old_rate = float(st.get("pan_rate_deg_s", 0.0) or 0.0)
- st["pan_rate_deg_s"] = (1.0 - rate_alpha) * old_rate + rate_alpha * raw_rate
+ st["pan_rate_deg_s"] = (1.0 - pan_alpha) * old_rate + pan_alpha * raw_rate
pan_rate_updated = True
st["az_deg"] = pan_n # <-- это читает ptz_io._ptz_worker при bounded-патруле
st["pan_deg"] = pan_n # удобный синоним
@@ -126,7 +133,7 @@
tilt_limit = float(cfg.get("ptz_tilt_max_speed_deg_s", getattr(config, "AIM_TILT_SPEED_DEG_S", 120.0)))
if abs(raw_rate) <= max(1.0, tilt_limit * 1.35):
old_rate = float(st.get("tilt_rate_deg_s", 0.0) or 0.0)
- st["tilt_rate_deg_s"] = (1.0 - rate_alpha) * old_rate + rate_alpha * raw_rate
+ st["tilt_rate_deg_s"] = (1.0 - tilt_alpha) * old_rate + tilt_alpha * raw_rate
tilt_rate_updated = True
st["tilt_deg"] = tilt_n
@@ -196,6 +203,14 @@
st["last_status_attempt_at"] = now
+def _track_status_period(camera_config, st):
+ rate = camera_config.get("ptz_status_track_hz")
+ if (type(rate) in (float, int) and 10 <= rate <= 15
+ and st.get("mode") == "TRACK" and st.get("tracking_active")):
+ return 1.0 / rate
+ return None
+
+
# -------------------- Основной поллер статуса ---------------------
async def _poll_camera_status_once(
cam_id: int, camera_config: dict, log_period: float,
@@ -204,6 +219,8 @@
"""Publish one result only while its camera configuration is still current."""
started_mono = time.monotonic()
config_snapshot = camera_config.copy()
+ st = state.ptz_states.get(cam_id, {})
+ sample_owner = _owner(st) if _track_status_period(camera_config, st) is not None else None
try:
full = await asyncio.to_thread(get_ptz_status_full, cam_id)
pan, tilt = full.pan, full.tilt
@@ -248,6 +265,17 @@
zoom_ratio=zoom_ratio, hfov_deg=hfov_deg, zoom_raw=zoom_raw,
zoom_tag=zoom_tag, zoom_age_sec=zoom_age_sec,
)
+ st = state.ptz_states.get(cam_id, {})
+ if (sample_owner is not None and sample_owner[1] > 0 and _owner(st) == sample_owner
+ and _track_status_period(camera_config, st) is not None):
+ _episode_telemetry(
+ config, cam_id, sample_owner, "status_sample", observed_at,
+ request_ms=request_ms, status_ok=(pan is not None or tilt is not None or hfov_deg is not None),
+ FOV_actual=hfov_deg,
+ FOV_status_utc=observed_at - zoom_age_sec
+ if hfov_deg is not None and zoom_age_sec is not None else None,
+ optics_fresh=hfov_deg is not None and zoom_age_sec == 0.0,
+ )
if log_period > 0 and _should_log_telemetry(cam_id, observed_at, log_period):
st = state.ptz_states.get(cam_id, {})
logger.info(
@@ -280,7 +308,7 @@
)
loop = asyncio.get_running_loop()
in_flight: dict[int, asyncio.Task] = {}
- next_due: dict[int, float] = {}
+ last_start: dict[int, float] = {}
session = {"active": True}
cancelling = False
try:
@@ -297,22 +325,29 @@
logger.exception("[STATUS] cam %d publication failed", cam_id)
# Do not cancel removed cameras' to_thread work and immediately
# launch another request for a reused ID. Retire it when done.
- for cam_id in list(next_due):
+ for cam_id in list(last_start):
if cam_id not in cam_ids and cam_id not in in_flight:
- del next_due[cam_id]
+ del last_start[cam_id]
now_mono = loop.time()
+ delay = min(0.05, interval)
for cam_id in sorted(cam_ids):
cfg = config.CAMERA_CONFIG.get(cam_id)
- if cfg is None or cam_id in in_flight or now_mono < next_due.get(cam_id, 0.0):
+ if cfg is None:
continue
- next_due[cam_id] = now_mono + interval
+ track_period = _track_status_period(cfg, state.ptz_states.get(cam_id, {}))
+ period = track_period if track_period is not None else interval
+ if track_period is not None:
+ delay = min(delay, period / 8)
+ if cam_id in in_flight or now_mono < last_start.get(cam_id, -float("inf")) + period:
+ continue
+ last_start[cam_id] = now_mono
in_flight[cam_id] = asyncio.create_task(
_poll_camera_status_once(cam_id, cfg, log_period, session),
name=f"ptz-status-{cam_id}",
)
# Bounded supervisor tick also notices camera add/delete and shutdown.
# Individual tasks publish as soon as ready, not at this tick.
- await asyncio.sleep(min(0.05, interval))
+ await asyncio.sleep(delay)
except asyncio.CancelledError:
logger.info("[STATUS] PTZ status poller cancelled")
cancelling = True

@ -0,0 +1,113 @@
"""Test the additive patch against the pinned PR10 status.py without HTTP."""
import asyncio
from hashlib import sha256
import json
from pathlib import Path
import subprocess
import sys
from tempfile import TemporaryDirectory
from types import ModuleType, SimpleNamespace
import unittest
from unittest.mock import patch
HERE = Path(__file__).resolve().parent
SOURCE = Path(sys.argv.pop(1)) if __name__ == "__main__" else None
@unittest.skipIf(SOURCE is None, "Pass the path to materialized PR10 status.py")
class FieldStatusTests(unittest.IsolatedAsyncioTestCase):
def setUp(self):
data = SOURCE.read_bytes()
pins = json.loads((HERE / "pins.json").read_bytes())["status.py"]
self.assertEqual(sha256(data).hexdigest(), pins["before"])
with TemporaryDirectory() as root:
path = Path(root) / "status.py"
path.write_bytes(data)
git = ["git", "-c", "core.autocrlf=false", "apply"]
subprocess.run([*git, str(HERE / "status.patch")], cwd=root, check=True)
candidate = path.read_bytes()
self.assertEqual(sha256(candidate).hexdigest(), pins["after"])
subprocess.run([*git, "-R", str(HERE / "status.patch")], cwd=root, check=True)
self.assertEqual(path.read_bytes(), data)
self.config = SimpleNamespace(PTZ_STATUS_HZ=4., PTZ_CAM_IDS=[0, 2, 4, 6, 8, 10],
CAMERA_CONFIG={c: {"ptz_status_track_hz": 15.}
for c in (0, 2, 4, 6, 8, 10)})
self.state = SimpleNamespace(shutdown=False, ptz_states={}, ptz_status={})
self.events = []
package = ModuleType("pilot_test")
package.config, package.state = self.config, self.state
mod = ModuleType("pilot_test.status")
mod.__package__ = package.__name__
values = {"pilot_test": package,
"pilot_test.utils": SimpleNamespace(clipf=lambda x, low, high: max(low, min(high, x)),
wrap_deg=lambda x: x),
"pilot_test.ptz_io": SimpleNamespace(get_ptz_status_full=None,
confirm_zoom_step_optics_feedback=None, _zoom_command_lock=None),
"pilot_test.zoom_controller": SimpleNamespace(
observe_calibration=None, _episode_telemetry=lambda *a, **kw:self.events.append((a, kw)),
_owner=lambda s:(s.get("ptz_generation", 0), s.get("track_started_at", 0.)))}
with patch.dict(sys.modules, values):
exec(compile(candidate, "status.py", "exec"), vars(mod))
self.status = mod
def test_only_valid_opt_in_track_accelerates(self):
for cam in self.config.PTZ_CAM_IDS:
cfg = self.config.CAMERA_CONFIG[cam]
self.assertAlmostEqual(self.status._track_status_period(cfg, {"mode":"TRACK", "tracking_active":True}), 1/15)
self.assertIsNone(self.status._track_status_period(cfg, {"mode":"RETURN", "tracking_active":True}))
for invalid in (None, 9, 16, True, "15", float("nan")):
self.assertIsNone(self.status._track_status_period({"ptz_status_track_hz":invalid},
{"mode":"TRACK", "tracking_active":True}))
async def test_one_request_per_camera_and_all_six_can_accelerate(self):
calls = dict.fromkeys(self.config.PTZ_CAM_IDS, 0)
inflight = set()
for cam in self.config.PTZ_CAM_IDS:
self.state.ptz_states[cam] = dict(mode="TRACK", tracking_active=True)
async def poll(cam, *args):
self.assertNotIn(cam, inflight)
inflight.add(cam)
calls[cam] += 1
await asyncio.sleep(.105 if cam == 0 else .002)
inflight.remove(cam)
self.status._poll_camera_status_once = poll
task = asyncio.create_task(self.status.ptz_status_poller())
try:
await asyncio.sleep(.42)
finally:
self.state.shutdown = True
await asyncio.wait_for(task, .5)
self.assertGreaterEqual(min(calls.values()), 3)
self.assertGreater(calls[2], calls[0])
async def test_late_reply_is_not_logged_for_new_track_and_cache_is_marked(self):
from threading import RLock
self.status._zoom_command_lock = lambda _: RLock()
self.status._update_runtime_state = lambda *args, **kwargs: None
self.state.ptz_states[8] = dict(mode="TRACK", tracking_active=True,
ptz_generation=1, track_started_at=100.)
value = SimpleNamespace(pan=0., tilt=0., zoom_ratio=2., hfov_deg=20.,
zoom_raw=20., zoom_tag="test", zoom_age_sec=.05)
async def late(*_):
self.state.ptz_states[8]["ptz_generation"] = 2
return value
async def current(*_):
return value
cfg = self.config.CAMERA_CONFIG[8]
with patch.object(self.status.asyncio, "to_thread", late):
await self.status._poll_camera_status_once(8, cfg, 0)
self.assertEqual(self.events, [])
with patch.object(self.status.asyncio, "to_thread", current):
await self.status._poll_camera_status_once(8, cfg, 0)
args, fields = self.events[0]
self.assertEqual(args[1:4], (8, (2, 100.), "status_sample"))
self.assertTrue(fields["status_ok"])
self.assertFalse(fields["optics_fresh"])
if __name__ == "__main__":
unittest.main()
Loading…
Cancel
Save