Serial Port Parity
wecoxSand opened this issue · 1 comments
wecoxSand commented
Using an empty constructor to generate a ModbusClient, then setting its properties. Setting ModbusClient.Parity = Parity.None;
before calling .Connect()
results in the internal serialport still creating with Parity.Even
Padanian commented
It all boils down to this deprecable getter/setter
public Parity Parity
{
get
{
if (serialport != null)
return parity;
else
return Parity.Even;
}
set
{
if (serialport != null)
parity = value;
}
}
Definining a property with the same name of an enum is a terrible idea.
Also Parity.Even is returned when serialport is null.