Commit bf53df05 authored by Michael Carpenter's avatar Michael Carpenter

Another change for issue #3, SerialLink::getCurrentPortS() should now return...

Another change for issue #3, SerialLink::getCurrentPortS() should now return consistant results on Windows to match linux and OSX
parent 8190209d
......@@ -348,7 +348,7 @@ QVector<QString>* SerialLink::getCurrentPorts()
for (int i = ports.size() - 1; i >= 0; i--)
{
QextPortInfo portInfo = ports.at(i);
QString portString = QString(portInfo.portName.toLocal8Bit().constData()) + " - " + QString(ports.at(i).friendName.toLocal8Bit().constData()).split("(").first();
QString portString = QString(portInfo.portName.toLocal8Bit().constData());// + " - " + QString(ports.at(i).friendName.toLocal8Bit().constData()).split("(").first();
// Prepend newly found port to the list
this->ports->append(portString);
}
......
......@@ -608,12 +608,6 @@ void QGCToolBar::connectLink(bool connect)
if (link)
{
QString portname = portComboBox->currentText().split(":")[2];
if (portname.indexOf('-') >= 0)
{
//Take everything before the last -, this ensures if the com port has a - in it, it will be included,
//since the last - is inserted by me.
portname = portname.mid(0,portname.lastIndexOf("-")-1);
}
link->setPortName(portname.trimmed());
}
link->connect();
......
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