Commit 16ee3c6a authored by lm's avatar lm

Fixed last comm port config error

parent 20d72b17
...@@ -260,9 +260,9 @@ userConfigured(false) ...@@ -260,9 +260,9 @@ userConfigured(false)
connect(ui.portName, SIGNAL(currentIndexChanged(QString)), this, SLOT(setPortName(QString))); connect(ui.portName, SIGNAL(currentIndexChanged(QString)), this, SLOT(setPortName(QString)));
connect(ui.baudRate, SIGNAL(activated(int)), this->link, SLOT(setBaudRateType(int))); connect(ui.baudRate, SIGNAL(activated(int)), this->link, SLOT(setBaudRateType(int)));
connect(ui.flowControlCheckBox, SIGNAL(toggled(bool)), this, SLOT(enableFlowControl(bool))); connect(ui.flowControlCheckBox, SIGNAL(toggled(bool)), this, SLOT(enableFlowControl(bool)));
connect(ui.parNone, SIGNAL(toggled(bool)), this, SLOT(setParityNone())); connect(ui.parNone, SIGNAL(toggled(bool)), this, SLOT(setParityNone(bool)));
connect(ui.parOdd, SIGNAL(toggled(bool)), this, SLOT(setParityOdd())); connect(ui.parOdd, SIGNAL(toggled(bool)), this, SLOT(setParityOdd(bool)));
connect(ui.parEven, SIGNAL(toggled(bool)), this, SLOT(setParityEven())); connect(ui.parEven, SIGNAL(toggled(bool)), this, SLOT(setParityEven(bool)));
connect(ui.dataBitsSpinBox, SIGNAL(valueChanged(int)), this->link, SLOT(setDataBits(int))); connect(ui.dataBitsSpinBox, SIGNAL(valueChanged(int)), this->link, SLOT(setDataBits(int)));
connect(ui.stopBitsSpinBox, SIGNAL(valueChanged(int)), this->link, SLOT(setStopBits(int))); connect(ui.stopBitsSpinBox, SIGNAL(valueChanged(int)), this->link, SLOT(setStopBits(int)));
...@@ -283,7 +283,7 @@ userConfigured(false) ...@@ -283,7 +283,7 @@ userConfigured(false)
break; break;
default: default:
// Enforce default: no parity in link // Enforce default: no parity in link
setParityNone(); setParityNone(true);
ui.parNone->setChecked(true); ui.parNone->setChecked(true);
break; break;
} }
...@@ -473,19 +473,19 @@ void SerialConfigurationWindow::enableFlowControl(bool flow) ...@@ -473,19 +473,19 @@ void SerialConfigurationWindow::enableFlowControl(bool flow)
} }
} }
void SerialConfigurationWindow::setParityNone() void SerialConfigurationWindow::setParityNone(bool accept)
{ {
link->setParityType(0); if (accept) link->setParityType(0);
} }
void SerialConfigurationWindow::setParityOdd() void SerialConfigurationWindow::setParityOdd(bool accept)
{ {
link->setParityType(1); if (accept) link->setParityType(1);
} }
void SerialConfigurationWindow::setParityEven() void SerialConfigurationWindow::setParityEven(bool accept)
{ {
link->setParityType(2); if (accept) link->setParityType(2);
} }
void SerialConfigurationWindow::setPortName(QString port) void SerialConfigurationWindow::setPortName(QString port)
......
...@@ -55,9 +55,9 @@ public: ...@@ -55,9 +55,9 @@ public:
public slots: public slots:
void configureCommunication(); void configureCommunication();
void enableFlowControl(bool flow); void enableFlowControl(bool flow);
void setParityNone(); void setParityNone(bool accept);
void setParityOdd(); void setParityOdd(bool accept);
void setParityEven(); void setParityEven(bool accept);
void setPortName(QString port); void setPortName(QString port);
void setLinkName(QString name); void setLinkName(QString name);
void setupPortList(); void setupPortList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment