fix: 补充 RM75 UDP 超时反馈年龄
This commit is contained in:
@@ -136,12 +136,19 @@ def test_short_udp_timeout_repeats_last_limited_target_without_query() -> None:
|
||||
stop=lambda: pytest.fail("stop must not run"),
|
||||
)
|
||||
teleop = _timeout_teleop(adapter)
|
||||
warnings = []
|
||||
teleop.get_logger = lambda: SimpleNamespace(
|
||||
warn=lambda message: warnings.append(message)
|
||||
)
|
||||
|
||||
teleop._handle_stale_joint_feedback(0.2)
|
||||
|
||||
assert sends == [([0.1] * 7, False)]
|
||||
assert teleop._last_joint_command_target == [0.1] * 7
|
||||
assert teleop._grip_rearm_required
|
||||
assert warnings == [
|
||||
"right_rm75 UDP关节反馈超时(age=200.0 ms),保持最后安全目标。"
|
||||
]
|
||||
|
||||
|
||||
def test_short_udp_timeout_without_active_target_stays_stopped() -> None:
|
||||
|
||||
Reference in New Issue
Block a user