SDS2000X示波器设备调试

This commit is contained in:
hsc
2026-07-16 14:55:14 +08:00
parent 0ed080f63c
commit 2dfc819bcc
9 changed files with 362 additions and 114 deletions

View File

@@ -155,19 +155,19 @@ namespace ZLGUSBCANFD
Thread.Sleep(50); // 确保轮询线程安全退出
_receiveThreads.Clear();
// 动态复位所有通道并释放DBC
//for (uint i = 0; i < _maxChannels; i++)
//{
// lock (_channelLocks[i])
// {
// if (_channelHandles[i] != IntPtr.Zero)
// {
// ZLGCAN.ZCAN_ResetCAN(_channelHandles[i]);
// _channelHandles[i] = IntPtr.Zero;
// }
// 释放通道DBC(i);
// }
//}
//动态复位所有通道并释放DBC
for (uint i = 0; i < _maxChannels; i++)
{
lock (_channelLocks[i])
{
if (_channelHandles[i] != IntPtr.Zero)
{
ZLGCAN.ZCAN_ResetCAN(_channelHandles[i]);
_channelHandles[i] = IntPtr.Zero;
}
DBC(i);
}
}
// 关闭设备主句柄
if (_deviceHandle != IntPtr.Zero)