允许 HHD 下采样率不同的标定保持兼容
按实际运行上下文核对其余处理参数,保留文件指纹与设备身份校验。115 项标定及运行时检查通过。
This commit is contained in:
@@ -306,6 +306,18 @@ def test_device_calibration_rejects_wrong_identity_and_pipeline(tmp_path: Path):
|
||||
load_for_device(root, "box", "BOX-001", pipeline={"dis_mode": 1})
|
||||
|
||||
|
||||
def test_device_calibration_accepts_only_downsample_difference(tmp_path: Path):
|
||||
path = _device_file(tmp_path, "BOX-001")
|
||||
doc = json.loads(path.read_text(encoding="utf-8"))
|
||||
doc["pipeline"] = {"dis_mode": 1, "hhd_downsample": 3}
|
||||
path.write_text(json.dumps(doc), encoding="utf-8")
|
||||
assert load_for_device(
|
||||
tmp_path, "box", "BOX-001", pipeline={"dis_mode": 1, "hhd_downsample": 2},
|
||||
) is not None
|
||||
with pytest.raises(CalibrationError, match="dis_mode"):
|
||||
load_for_device(tmp_path, "box", "BOX-001", pipeline={"dis_mode": 9, "hhd_downsample": 2})
|
||||
|
||||
|
||||
def test_device_calibration_rejects_partial_axes_and_unsafe_id(tmp_path: Path):
|
||||
root = tmp_path / "calibrations"
|
||||
root.mkdir()
|
||||
|
||||
Reference in New Issue
Block a user