feat: 提交前端逻辑分析仪后台捕获;Camera现在可以以更高帧率运行

This commit is contained in:
alivender
2025-07-16 21:14:23 +08:00
parent d551cbe793
commit 8e19587a16
8 changed files with 378 additions and 316 deletions

View File

@@ -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个字节
}
}
}