Remove debug serial port enumeration
This commit is contained in:
parent
fe49bee4c4
commit
018905bc4c
@ -32,28 +32,6 @@ std::vector<int> SensorDriver::Sensor::readValues() const
|
||||
SensorDriver::SensorDriver()
|
||||
{
|
||||
qDebug("Initializing sensor driver");
|
||||
|
||||
const auto serialPortInfos = QSerialPortInfo::availablePorts();
|
||||
|
||||
qDebug() << "Total number of ports available: " << serialPortInfos.count();
|
||||
|
||||
const QString blankString = "N/A";
|
||||
QString description;
|
||||
QString manufacturer;
|
||||
QString serialNumber;
|
||||
|
||||
for(const QSerialPortInfo& serialPortInfo: serialPortInfos) {
|
||||
description = serialPortInfo.description();
|
||||
manufacturer = serialPortInfo.manufacturer();
|
||||
serialNumber = serialPortInfo.serialNumber();
|
||||
qInfo() << "Port: " << serialPortInfo.portName();
|
||||
qInfo() << "Location: " << serialPortInfo.systemLocation();
|
||||
qInfo() << "Description: " << (!description.isEmpty() ? description : blankString);
|
||||
qInfo() << "Manufacturer: " << (!manufacturer.isEmpty() ? manufacturer : blankString);
|
||||
qInfo() << "Serial number: " << (!serialNumber.isEmpty() ? serialNumber : blankString);
|
||||
qInfo() << "Vendor Identifier: " << (serialPortInfo.hasVendorIdentifier() ? QByteArray::number(serialPortInfo.vendorIdentifier(), 16) : blankString);
|
||||
qInfo() << "Product Identifier: " << (serialPortInfo.hasProductIdentifier() ? QByteArray::number(serialPortInfo.productIdentifier(), 16) : blankString);
|
||||
}
|
||||
}
|
||||
|
||||
SensorDriver::~SensorDriver()
|
||||
|
Loading…
Reference in New Issue
Block a user