fix: 尝试去修复Debugger处理数据时出现错乱的问题
This commit is contained in:
parent
0cc35ce541
commit
1ca9999f15
|
@ -405,7 +405,8 @@ public class DebuggerController : ControllerBase
|
|||
logger.Error($"数据越界: port {port}, sample {i}");
|
||||
return StatusCode(StatusCodes.Status500InternalServerError, "数据越界");
|
||||
}
|
||||
UInt32 sample = BitConverter.ToUInt32(rawData, sampleOffset);
|
||||
var sampleBytes = rawData[sampleOffset..(sampleOffset + 4)];
|
||||
UInt32 sample = BitConverter.ToUInt32(Common.Number.ReverseBytes(sampleBytes, 4).Value, 0);
|
||||
// 提取wireWidth位
|
||||
UInt32 mask = (wireWidth == 32) ? 0xFFFFFFFF : ((1u << wireWidth) - 1u);
|
||||
channelUintArr[i] = (sample >> wireStart) & mask;
|
||||
|
|
Loading…
Reference in New Issue