未验证 提交 bd3eb2d6 编写于 作者: G gjnijenhuis 提交者: GitHub

Inverted the 'Device Already Open' check so it will work as designed. (#2095)

As per issue #2094
Co-authored-by: NGido Nijenhuis <g-nijenhuis@sensata.com>
上级 30f0875f
......@@ -37,7 +37,7 @@ namespace Iot.Device.Ft232H
/// <inheritdoc/>
public override I2cDevice CreateDevice(int deviceAddress)
{
if (!_usedAddresses.ContainsKey(deviceAddress))
if (_usedAddresses.ContainsKey(deviceAddress))
{
throw new ArgumentException($"Device with address 0x{deviceAddress,0X2} is already open.", nameof(deviceAddress));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册