Browse Source

Another change for issue #3, SerialLink::getCurrentPortS() should now return consistant results on Windows to match linux and OSX

QGC4.4
Michael Carpenter 12 years ago
parent
commit
bf53df056c
  1. 2
      src/comm/SerialLink.cc
  2. 6
      src/ui/QGCToolBar.cc

2
src/comm/SerialLink.cc

@ -348,7 +348,7 @@ QVector<QString>* SerialLink::getCurrentPorts() @@ -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);
}

6
src/ui/QGCToolBar.cc

@ -608,12 +608,6 @@ void QGCToolBar::connectLink(bool connect) @@ -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();

Loading…
Cancel
Save