diff --git a/src/comm/LinkInterface.h b/src/comm/LinkInterface.h index 72e2dd2db0162d659ca85a32eed1e187eb0039fd..b9b88671ce61b1aa3c6b797d3813206d7fd43ae2 100644 --- a/src/comm/LinkInterface.h +++ b/src/comm/LinkInterface.h @@ -237,7 +237,7 @@ signals: protected: static int getNextLinkId() { - static int nextId = 0; + static int nextId = 1; return nextId++; } diff --git a/src/uas/UASManager.cc b/src/uas/UASManager.cc index a105b8675c70d2313e39c96ab9b2b2c0942f8fcb..dcb334fbc7c191293757fb2ca7267d97fe47f5d7 100644 --- a/src/uas/UASManager.cc +++ b/src/uas/UASManager.cc @@ -207,6 +207,8 @@ UASManager::~UASManager() foreach (UASInterface* mav, systems) { delete mav; } + this->quit(); + this->wait(); } diff --git a/src/ui/DebugConsole.cc b/src/ui/DebugConsole.cc index a65e6de1da58a7124f3eca23e72d1dd113c141a7..c05231eb10d8707cfd9e552ef16ca4b965a02232 100644 --- a/src/ui/DebugConsole.cc +++ b/src/ui/DebugConsole.cc @@ -219,9 +219,14 @@ void DebugConsole::linkSelected(int linkId) */ void DebugConsole::updateLinkName(QString name) { - // Set name if signal came from a link + // Set name if signal came from a link LinkInterface* link = qobject_cast<LinkInterface*>(sender()); - if (link != NULL) m_ui->linkComboBox->setItemText(link->getId(), name); + //if (link != NULL) m_ui->linkComboBox->setItemText(link->getId(), name); + if((link != NULL) && (links.contains(link))) + { + const qint16 &linkIndex(links.indexOf(link)); + m_ui->linkComboBox->setItemText(linkIndex,name); + } } void DebugConsole::setAutoHold(bool hold)