fix: 修复了i2c地址设置问题
This commit is contained in:
		@@ -357,7 +357,7 @@ class Camera
 | 
			
		||||
                logger.Error($"STORE_NUM write returned false for camera at {this.address}:{this.port}");
 | 
			
		||||
                return new(new Exception($"STORE_NUM write returned false for camera at {this.address}:{this.port}"));
 | 
			
		||||
            }
 | 
			
		||||
        }78
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            var ret = await UDPClientPool.WriteAddr(this.ep, 2, CameraAddr.CAPTURE_ON, 0x01);
 | 
			
		||||
 
 | 
			
		||||
@@ -156,7 +156,7 @@ public class I2c
 | 
			
		||||
        // 配置I2C地址、协议及启动传输
 | 
			
		||||
        {
 | 
			
		||||
            var ret = await UDPClientPool.WriteAddr(
 | 
			
		||||
                this.ep, 2, I2cAddr.BaseConfig, (devAddr << 1) | (((uint)proto) << 16) | (1 << 24));
 | 
			
		||||
                this.ep, 2, I2cAddr.BaseConfig, (devAddr) | (((uint)proto) << 16) | (1 << 24));
 | 
			
		||||
            if (!ret.IsSuccessful)
 | 
			
		||||
            {
 | 
			
		||||
                logger.Error($"Failed to configure I2C address/protocol/start: {ret.Error}");
 | 
			
		||||
@@ -228,7 +228,7 @@ public class I2c
 | 
			
		||||
        // 配置I2C地址、协议及启动传输(读操作)
 | 
			
		||||
        {
 | 
			
		||||
            var ret = await UDPClientPool.WriteAddr(
 | 
			
		||||
                this.ep, 2, I2cAddr.BaseConfig, (devAddr << 1) | (1 << 8) | (((uint)proto) << 16) | (1 << 24));
 | 
			
		||||
                this.ep, 2, I2cAddr.BaseConfig, (devAddr) | (1 << 8) | (((uint)proto) << 16) | (1 << 24));
 | 
			
		||||
            if (!ret.IsSuccessful)
 | 
			
		||||
            {
 | 
			
		||||
                logger.Error($"Failed to configure I2C address/protocol/start: {ret.Error}");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user