1
0
mirror of https://gitlab.com/pholy/OSCAR-code.git synced 2025-04-12 00:30:46 +00:00

Dump some serialport scanning information to help get the CMS50xW ports detected

This commit is contained in:
Mark Watkins 2014-09-19 12:07:28 +10:00
parent 6fd823104d
commit 15de13f107
4 changed files with 27 additions and 12 deletions

View File

@ -429,9 +429,10 @@ void RecalcMAP::run()
ChannelID prescode = CPAP_Pressure; ChannelID prescode = CPAP_Pressure;
if (day->channelExists(CPAP_IPAP)) { // if (day->channelExists(CPAP_IPAP)) {
prescode = CPAP_IPAP; // prescode = CPAP_IPAP;
} else if (day->channelExists(CPAP_EPAP)) { // } else
if (day->channelExists(CPAP_EPAP)) {
prescode = CPAP_EPAP; prescode = CPAP_EPAP;
} }

View File

@ -67,9 +67,14 @@ CMS50F37Loader::~CMS50F37Loader()
bool CMS50F37Loader::openDevice() bool CMS50F37Loader::openDevice()
{ {
if (port.isEmpty()) { if (port.isEmpty()) {
if (!scanDevice("",m_vendorID, m_productID)) bool b = scanDevice("",m_vendorID, m_productID);
if (!b) {
// b = scanDevice("", 0, 0);
}
if (!b) {
return false; return false;
} }
}
serial.setPortName(port); serial.setPortName(port);
if (!serial.open(QSerialPort::ReadWrite)) if (!serial.open(QSerialPort::ReadWrite))
return false; return false;

View File

@ -52,6 +52,15 @@ bool SerialOximeter::scanDevice(QString keyword,quint16 vendor_id, quint16 produ
qDebug() << dbg.toLocal8Bit().data(); qDebug() << dbg.toLocal8Bit().data();
break; break;
} else {
QString dbg=QString("Other Serial Port: %1 %2 %3 %4").arg(name).arg(desc).arg(info->manufacturer()).arg(info->systemLocation());
if (info->hasProductIdentifier()) //60000
dbg += QString(" PID: %1").arg(info->productIdentifier());
if (info->hasVendorIdentifier()) // 4292
dbg += QString(" VID: %1").arg(info->vendorIdentifier());
qDebug() << dbg.toLocal8Bit().data();
} }
} }
if (ports.isEmpty()) { if (ports.isEmpty()) {

View File

@ -51,7 +51,7 @@
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="importTab"> <widget class="QWidget" name="importTab">
<attribute name="title"> <attribute name="title">