1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

LP-430 add description to serial devices display name

will show in the Connections drop down
This commit is contained in:
Philippe Renon 2016-10-10 18:49:11 +02:00
parent 092079fb51
commit 365f0ca3ad

View File

@ -139,11 +139,16 @@ QList <Core::IConnection::device> SerialConnection::availableDevices()
// sort the list by port number (nice idea from PT_Dreamer :))
qSort(ports.begin(), ports.end(), sortPorts);
foreach(QSerialPortInfo port, ports) {
device d;
d.displayName = port.portName();
d.name = port.portName();
d.displayName = port.portName();
if (!port.description().isEmpty()) {
d.displayName += " - " + port.description();
}
list.append(d);
}
}