diff --git a/src/comm/LinkManager.cc b/src/comm/LinkManager.cc index 4d5be69aba8da7505f9bbeb37f03b0d3b84234ee..879bfdc65183181563935c72db304b5e0ed4bc92 100644 --- a/src/comm/LinkManager.cc +++ b/src/comm/LinkManager.cc @@ -47,7 +47,7 @@ This file is part of the QGROUNDCONTROL project #include "QGCApplication.h" IMPLEMENT_QGC_SINGLETON(LinkManager, LinkManager) - +QGC_LOGGING_CATEGORY(LinkManagerLog, "LinkManagerLog") /** * @brief Private singleton constructor @@ -459,15 +459,13 @@ void LinkManager::_updateConfigurationList(void) QList portList = QSerialPortInfo::availablePorts(); // Iterate Comm Ports foreach (QSerialPortInfo portInfo, portList) { -#if 0 - qDebug() << "-----------------------------------------------------"; - qDebug() << "portName: " << portInfo.portName(); - qDebug() << "systemLocation: " << portInfo.systemLocation(); - qDebug() << "description: " << portInfo.description(); - qDebug() << "manufacturer: " << portInfo.manufacturer(); - qDebug() << "serialNumber: " << portInfo.serialNumber(); - qDebug() << "vendorIdentifier: " << portInfo.vendorIdentifier(); -#endif + qCDebug(LinkManagerLog) << "-----------------------------------------------------"; + qCDebug(LinkManagerLog) << "portName: " << portInfo.portName(); + qCDebug(LinkManagerLog) << "systemLocation: " << portInfo.systemLocation(); + qCDebug(LinkManagerLog) << "description: " << portInfo.description(); + qCDebug(LinkManagerLog) << "manufacturer: " << portInfo.manufacturer(); + qCDebug(LinkManagerLog) << "serialNumber: " << portInfo.serialNumber(); + qCDebug(LinkManagerLog) << "vendorIdentifier: " << portInfo.vendorIdentifier(); // Save port name currentPorts << portInfo.systemLocation(); // Is this a PX4 and NOT in bootloader mode? @@ -483,6 +481,8 @@ void LinkManager::_updateConfigurationList(void) // Lets create a new Serial configuration automatically if (portInfo.description() == "AeroCore") { pSerial = new SerialConfiguration(QString("AeroCore on %1").arg(portInfo.portName().trimmed())); + } else if (portInfo.description().contains("PX4Flow")) { + pSerial = new SerialConfiguration(QString("PX4Flow on %1").arg(portInfo.portName().trimmed())); } else if (portInfo.description().contains("PX4")) { pSerial = new SerialConfiguration(QString("Pixhawk on %1").arg(portInfo.portName().trimmed())); } else { diff --git a/src/comm/LinkManager.h b/src/comm/LinkManager.h index b202995d65a89513a96f9adf021fc4753e2b50a9..f6bde59342deb99bb80334053f7809998569ffde 100644 --- a/src/comm/LinkManager.h +++ b/src/comm/LinkManager.h @@ -33,6 +33,7 @@ This file is part of the PIXHAWK project #include "LinkConfiguration.h" #include "LinkInterface.h" +#include "QGCLoggingCategory.h" // Links #ifndef __ios__ @@ -49,6 +50,8 @@ This file is part of the PIXHAWK project #include "QGCSingleton.h" #include "MAVLinkProtocol.h" +Q_DECLARE_LOGGING_CATEGORY(LinkManagerLog) + class LinkManagerTest; /// Manage communication links