Fix error in serial init caused by the last commit
This commit is contained in:
+3
-3
@@ -16,7 +16,7 @@ SerialWorker::~SerialWorker()
|
||||
if (serial != NULL) delete serial;
|
||||
}
|
||||
|
||||
void SerialWorker::setSerialPort(QSerialPortInfo &port)
|
||||
void SerialWorker::setSerialPort(QSerialPortInfo *port)
|
||||
{
|
||||
if (!(serial == NULL))
|
||||
{
|
||||
@@ -27,9 +27,9 @@ void SerialWorker::setSerialPort(QSerialPortInfo &port)
|
||||
delete serial;
|
||||
}
|
||||
|
||||
serial = new QSerialPort(port);
|
||||
serial = new QSerialPort(*port);
|
||||
|
||||
qDebug() << "Serial port name is " << port.portName();
|
||||
qDebug() << "Serial port name is " << port->portName();
|
||||
serial->open(QIODevice::ReadWrite);
|
||||
QByteArray output;
|
||||
output.append(0xE7);
|
||||
|
||||
Reference in New Issue
Block a user