diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..558c499 Binary files /dev/null and b/.DS_Store differ diff --git a/doc/.DS_Store b/doc/.DS_Store new file mode 100644 index 0000000..66a3a1b Binary files /dev/null and b/doc/.DS_Store differ diff --git a/doc/.~程序说明.docx b/doc/.~程序说明.docx new file mode 100644 index 0000000..23dc7f5 Binary files /dev/null and b/doc/.~程序说明.docx differ diff --git a/doc/745b4279f2c9754c20fcf1f22c12db2a.png b/doc/745b4279f2c9754c20fcf1f22c12db2a.png new file mode 100644 index 0000000..b21e641 Binary files /dev/null and b/doc/745b4279f2c9754c20fcf1f22c12db2a.png differ diff --git a/doc/主界面.png b/doc/主界面.png index 2f228a5..c6aaf11 100644 Binary files a/doc/主界面.png and b/doc/主界面.png differ diff --git a/doc/保存的数据.PNG b/doc/保存的数据.PNG new file mode 100644 index 0000000..12d98b9 Binary files /dev/null and b/doc/保存的数据.PNG differ diff --git a/doc/加载和绘制.PNG b/doc/加载和绘制.PNG new file mode 100644 index 0000000..6623538 Binary files /dev/null and b/doc/加载和绘制.PNG differ diff --git a/doc/数据预览图.PNG b/doc/数据预览图.PNG new file mode 100644 index 0000000..6395201 Binary files /dev/null and b/doc/数据预览图.PNG differ diff --git a/doc/程序说明.docx b/doc/程序说明.docx new file mode 100644 index 0000000..848d4a8 Binary files /dev/null and b/doc/程序说明.docx differ diff --git a/doc/程序说明.pdf b/doc/程序说明.pdf new file mode 100644 index 0000000..323a473 Binary files /dev/null and b/doc/程序说明.pdf differ diff --git a/src/monitor.py b/src/monitor.py index efc2667..04c2490 100644 --- a/src/monitor.py +++ b/src/monitor.py @@ -198,8 +198,8 @@ class VoltageReaderApp(QMainWindow): if self.buffer[:2] == bytearray(self.PACKET_HEADER) and self.buffer[self.PACKET_SIZE-1] == self.PACKET_FOOTER: packet = self.buffer[:self.PACKET_SIZE] self.buffer = self.buffer[self.PACKET_SIZE:] - raw_values = [packet[2 + i*2] | (packet[3 + i*2] << 8) for i in range(self.NUM_CHANNELS)] - voltages = [(raw / 4096.0) * 3.3 for raw in raw_values] + raw_values = [packet[2 + i*2] | (packet[3 + i*2] << 8) for i in range(self.NUM_CHANNELS)]# 读取原始数据 + voltages = [(raw / 4096.0) * 3.3 for raw in raw_values] # 自定义数据计算方法 for i in range(self.NUM_CHANNELS): self.raw_data[i].append(raw_values[i]) self.data[i].append(voltages[i])