feat: 提交前端逻辑分析仪后台捕获;Camera现在可以以更高帧率运行
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Net;
|
||||
using Common;
|
||||
using DotNext;
|
||||
|
||||
namespace Peripherals.LogicAnalyzerClient;
|
||||
@@ -23,17 +24,17 @@ static class AnalyzerAddr
|
||||
/// 10: 全局非与(~&) <br/>
|
||||
/// 11: 全局非或(~|) <br/>
|
||||
/// </summary>
|
||||
public const UInt32 GLOBAL_TRIG_MODE = BASE + 0x0000_0000;
|
||||
public const UInt32 GLOBAL_TRIG_MODE = BASE + 0x0000_0001;
|
||||
|
||||
/// <summary>
|
||||
/// 0x0000_0010 - 0x0000_0017 R/W [5:0] 信号M的触发操作符,共8路 <br/>
|
||||
/// [2:0] M's Operator: 000 == <br/>
|
||||
/// [5:3] M's Operator: 000 == <br/>
|
||||
/// 001 != <br/>
|
||||
/// 010 < <br/>
|
||||
/// 011 <= <br/>
|
||||
/// 100 > <br/>
|
||||
/// 101 >= <br/>
|
||||
/// [5:3] M's Value: 000 LOGIC 0 <br/>
|
||||
/// [2:0] M's Value: 000 LOGIC 0 <br/>
|
||||
/// 001 LOGIC 1 <br/>
|
||||
/// 010 X(not care) <br/>
|
||||
/// 011 RISE <br/>
|
||||
@@ -266,7 +267,7 @@ public class Analyzer
|
||||
logger.Error("ReadAddr returned invalid data for capture status");
|
||||
return new(new Exception("Failed to read capture status"));
|
||||
}
|
||||
UInt32 status = BitConverter.ToUInt32(ret.Value.Options.Data, 0);
|
||||
UInt32 status = Number.BytesToUInt32(ret.Value.Options.Data).Value;
|
||||
return (CaptureStatus)status;
|
||||
}
|
||||
|
||||
@@ -304,8 +305,8 @@ public class Analyzer
|
||||
if (signalIndex < 0 || signalIndex >= AnalyzerAddr.SIGNAL_TRIG_MODE.Length)
|
||||
return new(new ArgumentException($"Signal index must be 0~{AnalyzerAddr.SIGNAL_TRIG_MODE.Length}"));
|
||||
|
||||
// 计算模式值: [2:0] 操作符, [5:3] 信号值
|
||||
UInt32 mode = ((UInt32)val << 3) | (UInt32)op;
|
||||
// 计算模式值: [2:0] 信号值, [5:3] 操作符
|
||||
UInt32 mode = ((UInt32)op << 3) | (UInt32) val;
|
||||
|
||||
var addr = AnalyzerAddr.SIGNAL_TRIG_MODE[signalIndex];
|
||||
var ret = await UDPClientPool.WriteAddr(this.ep, this.taskID, addr, mode, this.timeout);
|
||||
|
||||
Reference in New Issue
Block a user