feat(devkit): 终端打印pzt_angle/magnitude/state

This commit is contained in:
lenn
2026-05-23 19:14:14 +08:00
parent f1ae60c69f
commit e52c86ea1a
2 changed files with 2 additions and 3 deletions

View File

@@ -278,9 +278,8 @@ class SensorPushServicer(sensor_stream_pb2_grpc.SensorPushServicer):
try: try:
angle, magnitude, state, cop_x, cop_y, base_x, base_y = get_pzt_angle(frame.matrix) angle, magnitude, state, cop_x, cop_y, base_x, base_y = get_pzt_angle(frame.matrix)
self.last_angle = angle self.last_angle = angle
# 打印接收到的数据 # 打印接收到的数据和计算结果
print(f"[Recv #{frame.seq}] seq={frame.seq} ts={frame.timestamp_ms} dts={frame.dts_ms} " print(f"[PZT] seq={frame.seq} pzt_angle={angle:.2f} magnitude={magnitude:.4f} state={state}")
f"data={list(frame.matrix)}")
except Exception as e: except Exception as e:
ok = False ok = False
message = str(e) message = str(e)