feat: 提交前端逻辑分析仪后台捕获;Camera现在可以以更高帧率运行
This commit is contained in:
@@ -296,20 +296,20 @@ public class I2c
|
||||
|
||||
// 读取数据
|
||||
{
|
||||
var ret = await UDPClientPool.ReadAddr(this.ep, this.taskID, I2cAddr.Read, dataReadLength);
|
||||
var ret = await UDPClientPool.ReadAddr(this.ep, this.taskID, I2cAddr.Read);
|
||||
if (!ret.IsSuccessful)
|
||||
{
|
||||
logger.Error($"Failed to read data from I2C FIFO: {ret.Error}");
|
||||
return new(ret.Error);
|
||||
}
|
||||
|
||||
if (ret.Value.Options.Data == null || ret.Value.Options.Data.Length != dataReadLength)
|
||||
if (ret.Value.Options.Data == null)
|
||||
{
|
||||
logger.Error($"ReadAddr returned unexpected data length: {ret.Value.Options.Data?.Length ?? 0}");
|
||||
return new(new Exception("Failed to read expected amount of data from I2C FIFO"));
|
||||
}
|
||||
|
||||
return ret.Value.Options.Data;
|
||||
return ret.Value.Options.Data[3..]; // 返回读取到的数据,跳过前3个字节
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user