Skip to content

Commit

Permalink
#855 fix linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
drmason789 committed Jan 3, 2024
1 parent 90ada8b commit a0689cb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/trixterxdreamv1serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,19 @@ QStringList trixterxdreamv1serial::availablePorts(bool debug) {
#ifndef Q_OS_IOS
auto ports = QSerialPortInfo::availablePorts();
for(const auto &port : ports) {
QString portName = port.portName();

#if defined(Q_OS_LINUX)
if(!port.startsWith("ttyUSB"))
if(!portName.startsWith("ttyUSB"))
{
qDebug() << "Skipping port: " << port << " because it doesn't start with ttyUSB";
qDebug() << "Skipping port: " << portName << " because it doesn't start with ttyUSB";
continue;
}
#endif
result.push_back(port.portName());
result.push_back(portName);

if (debug) {
qDebug() << "Found portName:" << port.portName()
qDebug() << "Found portName:" << portName
<< "," << "description:" << port.description()
<< "," << "vender identifier:" << port.vendorIdentifier()
<< "," << "manufacturer:" << port.manufacturer()
Expand Down

0 comments on commit a0689cb

Please sign in to comment.