fix: 修改摄像头读取地址
This commit is contained in:
parent
fad37ba922
commit
558a139593
|
@ -29,6 +29,8 @@ class Camera
|
|||
const UInt16 H_CMOS_DISP = 640;
|
||||
const UInt16 TOTAL_H_PIXEL = 2570;
|
||||
const UInt16 TOTAL_V_PIXEL = 980;
|
||||
|
||||
const UInt32 FrameAddr = 0x00;
|
||||
const UInt32 FrameLength = V_CMOS_DISP * H_CMOS_DISP * 16 / 32;
|
||||
|
||||
static byte[][] data = new byte[][] {
|
||||
|
@ -330,7 +332,7 @@ class Camera
|
|||
public async ValueTask<Result<bool>> Init()
|
||||
{
|
||||
{
|
||||
var ret = await UDPClientPool.WriteAddr(this.ep, 2, CameraAddr.STORE_ADDR, 0x00);
|
||||
var ret = await UDPClientPool.WriteAddr(this.ep, 2, CameraAddr.STORE_ADDR, FrameAddr);
|
||||
if (!ret.IsSuccessful)
|
||||
{
|
||||
logger.Error($"Failed to write STORE_ADDR to camera at {this.address}:{this.port}, error: {ret.Error}");
|
||||
|
@ -408,7 +410,7 @@ class Camera
|
|||
var result = await UDPClientPool.ReadAddr4Bytes(
|
||||
this.ep,
|
||||
2, // taskID
|
||||
CameraAddr.BASE,
|
||||
FrameAddr,
|
||||
((int)FrameLength),
|
||||
this.timeout);
|
||||
|
||||
|
|
Loading…
Reference in New Issue