Newer
Older
{
bool reconnect = false;
bool accepted = false;
if(isConnected())
{
disconnect();
reconnect = true;
}
if (stopBits >= (int)STOP_1 && dataBits <= (int)STOP_2)
{
StopBitsType newBits = (StopBitsType) stopBits;
port->setStopBits(newBits);
accepted = true;
}
if(reconnect) connect();
return accepted;
}