diff --git a/SamplingDialog.py b/SamplingDialog.py index 3e35308..9b2871d 100644 --- a/SamplingDialog.py +++ b/SamplingDialog.py @@ -742,7 +742,8 @@ class CalibrationDialog(QDialog): def process_wave_packet(self, wave_data): data = wave_data # 接收所有数据 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 self.scaled_data = data * LSB_32BIT @@ -753,7 +754,7 @@ class CalibrationDialog(QDialog): print(f"top10_max 去除最大的数据后的平均值1:{mean_max}") mean_min = self.mean_without_min_optimized(result['top10_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: self.value_labels[self.type_index].setText(str(round(pp, 6))) print(f"pp :{mean_max - mean_min}") diff --git a/mainwindow.py b/mainwindow.py index 5e68985..2840ab8 100644 --- a/mainwindow.py +++ b/mainwindow.py @@ -625,7 +625,7 @@ class SocketClientApp(QMainWindow): for i in range(min(5, len(data))): # 确保不超过数据长度 print(f"{data[i]:.3f}", end=" ") 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 self.scaled_data = data * LSB_32BIT