Remove ReadBit

Using ReadBytes to allow for later unification of Byte conversion logic
This commit is contained in:
Peter Butzhammer
2024-02-06 14:36:32 +01:00
parent fe68b1d565
commit ffa4ee6236
3 changed files with 2 additions and 19 deletions

View File

@@ -144,9 +144,8 @@ namespace Sharp7.Rx
if (typeof(TValue) == typeof(bool))
{
var b = await s7Connector.ReadBit(address.Operand, address.Start, address.Bit, address.DbNr, token);
token.ThrowIfCancellationRequested();
return (TValue)(object)b;
var b = await s7Connector.ReadBytes(address.Operand, address.Start, address.Length, address.DbNr, token);
return ConvertToType<TValue>(b, address);
}
if (typeof(TValue) == typeof(int))