添加速度

This commit is contained in:
zhangsheng 2025-06-03 12:42:15 +08:00
parent a22d6fab7b
commit 417965a111
2 changed files with 3 additions and 1 deletions

View File

@ -292,6 +292,7 @@ class CalibrationDialog(QDialog):
self.setWindowTitle("校准设置")
self.socket = socket
self.type_index = 0
self.setFixedWidth(300)
# 通道与类型选择
self.partial_data = QByteArray()
self.recv_state = ''
@ -594,7 +595,7 @@ class CalibrationDialog(QDialog):
print(f"top10_min 去除最大的数据后的平均值2{mean_min}")
pp = mean_max - mean_min
if self.type_cb.currentIndex() == 2:
self.value_labels[self.type_index].setText(str(round(pp,3)))
self.value_labels[self.type_index].setText(str(round(pp,6)))
print(f"pp :{mean_max - mean_min}")
def closeEvent(self, event):

View File

@ -466,6 +466,7 @@ class SocketClientApp(QMainWindow):
execution_time = end_time - self.start_time
print(f"结束时间戳: {end_time}")
print(f"代码执行时间: {execution_time}")
print(f"speed :{round((self.sampling_rate * 4 * 8) / execution_time,3)} Kbps")
self.process_wave_packet(bytes(self.partial_data))
self.recv_state = 'WAIT_HEADER'
self.partial_data.clear()