从中找出数据的头,然后读取数据
if (readedDataBuffer.Count >= 20) { int removeCount = 0; for (int i = 0; i < readedDataBuffer.Count - 18; ++i) { // 14 7B节点 if (readedDataBuffer[i] == 0xFD & readedDataBuffer[i + 4] == 0x28 & readedDataBuffer[i + 5] == 0x7B) { byte[] data = new byte[20]; /*节点*/ int data31, data32; double v3, T3; data31 = readedDataBuffer[i + 12];//高八位 data32 = readedDataBuffer[i + 13];//低八位 v3 = (data31 * 256 + data32);//电压值 T3 = -39.66 + 0.01 * v3 + 0.026; tcure = T3; wendu = T3.ToString(); } removeCount++; } }
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号