From 938ee80979cb74666132f6ca73c314445633f939 Mon Sep 17 00:00:00 2001 From: alivender <13898766233@163.com> Date: Tue, 15 Jul 2025 17:59:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4Camera=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E8=AF=BB=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/Peripherals/CameraClient.cs | 27 -------------------------- 1 file changed, 27 deletions(-) diff --git a/server/src/Peripherals/CameraClient.cs b/server/src/Peripherals/CameraClient.cs index e3815a2..b402841 100644 --- a/server/src/Peripherals/CameraClient.cs +++ b/server/src/Peripherals/CameraClient.cs @@ -242,33 +242,6 @@ class Camera return result.Value; } - /// - /// 读取摄像头寄存器 - /// - /// 寄存器地址 - /// 读取到的寄存器值 - private async ValueTask> ReadRegister(UInt16 registerAddr) - { - var i2c = new Peripherals.I2cClient.I2c(this.address, this.port, this.taskID, this.timeout); - - // 地址高低字节 - var addrBytes = new byte[2]; - addrBytes[0] = (byte)(registerAddr >> 8); - addrBytes[1] = (byte)(registerAddr & 0xFF); - - // 先写寄存器地址 - var writeResult = await i2c.WriteData(CAM_I2C_ADDR, addrBytes, CAM_PROTO); - if (!writeResult.IsSuccessful) - return new(writeResult.Error); - - // 再读一个字节 - var readResult = await i2c.ReadData(CAM_I2C_ADDR, 1, CAM_PROTO); - if (!readResult.IsSuccessful) - return new(readResult.Error); - - return readResult.Value[0]; - } - /// /// 批量配置I2C寄存器 ///