fix:修复示波器获取失败的问题
This commit is contained in:
@@ -70,7 +70,7 @@ class Oscilloscope
|
||||
private static readonly NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
|
||||
|
||||
readonly int timeout = 2000;
|
||||
readonly int taskID = 1;
|
||||
readonly int taskID = 0;
|
||||
|
||||
readonly int port;
|
||||
readonly string address;
|
||||
@@ -327,7 +327,7 @@ class Oscilloscope
|
||||
return new(ret.Error);
|
||||
}
|
||||
var data = ret.Value;
|
||||
if (data == null || data.Length != OscilloscopeAddr.RD_DATA_LENGTH)
|
||||
if (data == null || data.Length != OscilloscopeAddr.RD_DATA_LENGTH / 8)
|
||||
{
|
||||
logger.Error($"Waveform data length mismatch: {data?.Length}");
|
||||
return new(new Exception("Waveform data length mismatch"));
|
||||
|
||||
Reference in New Issue
Block a user