add codes.
This commit is contained in:
parent
dfe6dd1647
commit
b212882709
@ -742,7 +742,8 @@ class CalibrationDialog(QDialog):
|
|||||||
def process_wave_packet(self, wave_data):
|
def process_wave_packet(self, wave_data):
|
||||||
data = wave_data # 接收所有数据
|
data = wave_data # 接收所有数据
|
||||||
data = np.frombuffer(data, dtype=np.int32) # 根据实际数据格式转换
|
data = np.frombuffer(data, dtype=np.int32) # 根据实际数据格式转换
|
||||||
LSB_32BIT = (2.8 / (2 ** 31)) * ((750 + 249) / 249) * 1000 / 10.2
|
LSB_32BIT = (2.8 / (2 ** 31)) * ((300 + 100) / 100) * 1000
|
||||||
|
# LSB_32BIT = (2.8 / (2 ** 31)) * ((750 + 249) / 249) * 1000 / 10.2
|
||||||
# LSB_32BIT = (2.8 / (2 ** 31)) * ((750 + 287) / 287) * 1000 / 10.2
|
# LSB_32BIT = (2.8 / (2 ** 31)) * ((750 + 287) / 287) * 1000 / 10.2
|
||||||
self.scaled_data = data * LSB_32BIT
|
self.scaled_data = data * LSB_32BIT
|
||||||
|
|
||||||
@ -753,7 +754,7 @@ class CalibrationDialog(QDialog):
|
|||||||
print(f"top10_max 去除最大的数据后的平均值1:{mean_max}")
|
print(f"top10_max 去除最大的数据后的平均值1:{mean_max}")
|
||||||
mean_min = self.mean_without_min_optimized(result['top10_min'])
|
mean_min = self.mean_without_min_optimized(result['top10_min'])
|
||||||
print(f"top10_min 去除最大的数据后的平均值2:{mean_min}")
|
print(f"top10_min 去除最大的数据后的平均值2:{mean_min}")
|
||||||
pp = (mean_max - mean_min) / 100
|
pp = (mean_max - mean_min)
|
||||||
if self.type_cb.currentIndex() == 2:
|
if self.type_cb.currentIndex() == 2:
|
||||||
self.value_labels[self.type_index].setText(str(round(pp, 6)))
|
self.value_labels[self.type_index].setText(str(round(pp, 6)))
|
||||||
print(f"pp :{mean_max - mean_min}")
|
print(f"pp :{mean_max - mean_min}")
|
||||||
|
|||||||
@ -625,7 +625,7 @@ class SocketClientApp(QMainWindow):
|
|||||||
for i in range(min(5, len(data))): # 确保不超过数据长度
|
for i in range(min(5, len(data))): # 确保不超过数据长度
|
||||||
print(f"{data[i]:.3f}", end=" ")
|
print(f"{data[i]:.3f}", end=" ")
|
||||||
print() # 换行
|
print() # 换行
|
||||||
LSB_32BIT = (2.8 / (2 ** 31)) * ((750 + 249) / 249) * 1000 / 10.2
|
LSB_32BIT = (2.8 / (2 ** 31)) * ((300 + 100) / 100) * 1000 / 10.2
|
||||||
# LSB_32BIT = (2.8 / (2 ** 31)) * ((750 + 287) / 287) * 1000 / 10.2
|
# LSB_32BIT = (2.8 / (2 ** 31)) * ((750 + 287) / 287) * 1000 / 10.2
|
||||||
# LSB_32BIT = (2.8 / (2 ** 31)) * ((750 + 287) / 287) * 1000
|
# LSB_32BIT = (2.8 / (2 ** 31)) * ((750 + 287) / 287) * 1000
|
||||||
self.scaled_data = data * LSB_32BIT
|
self.scaled_data = data * LSB_32BIT
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user