整理代码

This commit is contained in:
才明洋 committed 2018-01-20 20:56:27 +08:00
1 parent 45cd5d476f
commit 5bb9d8b01f
4 files changed
+5 -12

No files matched your search

-4
View File
@@ -34,7 +34,6 @@ void SerialController::closeSerial()
void SerialController::getBaudrate(QString baudrate)
{
serial->setBaudRate(baudrate.toInt());
qDebug()<<"The baudrate now is "<<baudrate.toInt();
}
@@ -46,13 +45,11 @@ void SerialController::getStopbits(QString stopbits)
serial->setStopBits(QSerialPort::OneAndHalfStop);
else if(stopbits == "2")
serial->setStopBits(QSerialPort::TwoStop);
qDebug()<<"The stopbits now is "<<stopbits;
}
void SerialController::getDatabits(QString databits)
{
serial->setDataBits(QSerialPort::DataBits(databits.toInt()));
qDebug()<<"The databits now is "<<databits;
}
void SerialController::getParity(QString parity)
@@ -65,7 +62,6 @@ void SerialController::getParity(QString parity)
else if(parity == tr("偶校验"))
serial->setParity(QSerialPort::EvenParity);
qDebug()<<"The parity now is "<<parity;
}
void SerialController::writeData(QString content)