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:
parent
092079fb51
commit
365f0ca3ad
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user