diff --git a/server/src/Peripherals/CameraClient.cs b/server/src/Peripherals/CameraClient.cs index 0bea403..78651ab 100644 --- a/server/src/Peripherals/CameraClient.cs +++ b/server/src/Peripherals/CameraClient.cs @@ -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); diff --git a/server/src/Peripherals/I2cClient.cs b/server/src/Peripherals/I2cClient.cs index 893ae8b..4aab247 100644 --- a/server/src/Peripherals/I2cClient.cs +++ b/server/src/Peripherals/I2cClient.cs @@ -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}");