创建了说明书文章

This commit is contained in:
Robofish 2024-11-04 00:02:17 +08:00
parent a26e43eda8
commit 248162f571
11 changed files with 2 additions and 2 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

BIN
doc/.DS_Store vendored Normal file

Binary file not shown.

BIN
doc/.~程序说明.docx Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 92 KiB

BIN
doc/保存的数据.PNG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

BIN
doc/加载和绘制.PNG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

BIN
doc/数据预览图.PNG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

BIN
doc/程序说明.docx Normal file

Binary file not shown.

BIN
doc/程序说明.pdf Normal file

Binary file not shown.

View File

@ -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])