新增统一力读数会话 ForceSession

把同帧测量、空载归零、模型推断与共用后处理收进一个 SDK 会话,Studio 显示与记录使用同一样本;旧 Sensor 读数接口保持兼容。以 force session 与受影响 SDK 套件、lint 与文档门禁验证,硬件与真实载荷精度未验证。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CpCfJF6SvonMKmPZhzKZHb
This commit is contained in:
ykcheungab
2026-10-20 07:07:22 +00:00
parent dc8a630df3
commit ee830d8505
17 changed files with 4175 additions and 29 deletions
+9
View File
@@ -34,6 +34,15 @@ class CalibrationContext(dict):
identity["tracker"]["hhd_downsample"] = downsample
return _feature_signature(identity)
@property
def actual_downsample(self) -> int:
"""The HHD downsample this runtime context was actually built with."""
raw = self.get("hhd_downsample", 1)
try:
return max(1, int(raw)) if raw is not None else 1
except (TypeError, ValueError):
return 1
def sha256_file(path) -> str:
return hashlib.sha256(Path(path).read_bytes()).hexdigest()