diff --git a/oscar/SleepLib/loader_plugins/cms50f37_loader.cpp b/oscar/SleepLib/loader_plugins/cms50f37_loader.cpp index 69c001f0..59b02928 100644 --- a/oscar/SleepLib/loader_plugins/cms50f37_loader.cpp +++ b/oscar/SleepLib/loader_plugins/cms50f37_loader.cpp @@ -578,9 +578,11 @@ void CMS50F37Loader::processBytes(QByteArray bytes) if (!started_import) { // startTimer.singleShot(2000, this, SLOT(requestData())); + importCount = 0; qDebug() << "cms50f37 - pB: Read:" << len << size << str.join(","); } else { - qDebug() << "cms50f37 - pB: Import:" << len << size << str.join(","); + importCount++; +// qDebug() << "cms50f37 - pB: Import:" << len << size << str.join(","); } idx += len; @@ -827,9 +829,11 @@ void CMS50F37Loader::resetImportTimeout() if (resetTimer.isActive()) resetTimer.stop(); - if (!finished_import) resetTimer.singleShot(2000, this, SLOT(resetImportTimeout())); + if (!finished_import) + resetTimer.singleShot(2000, this, SLOT(resetImportTimeout())); } else { qDebug() << "cms50f37 - Oximeter device stopped transmitting.. Transfer complete"; + qDebug() << "cms50f37 - Import packet count: " << importCount; // We were importing, but now are done if (!finished_import && (started_import && started_reading)) { qDebug() << "cms50f37 - Switching CMS50F37 back to live mode and finalizing import"; diff --git a/oscar/SleepLib/loader_plugins/cms50f37_loader.h b/oscar/SleepLib/loader_plugins/cms50f37_loader.h index f4805a0c..ccfe801e 100644 --- a/oscar/SleepLib/loader_plugins/cms50f37_loader.h +++ b/oscar/SleepLib/loader_plugins/cms50f37_loader.h @@ -82,14 +82,10 @@ protected slots: virtual void resetImportTimeout(); virtual void startImportTimeout(); virtual void shutdownPorts(); - - - void nextCommand(); protected: - bool readSpoRFile(const QString & path); virtual void processBytes(QByteArray bytes); @@ -100,12 +96,9 @@ protected: void sendCommand(quint8 c); void sendCommand(quint8 c, quint8 c2); - // Switch device to live streaming mode virtual void resetDevice(); - - private: int sequence; @@ -125,6 +118,7 @@ protected: int cb_reset,imp_callbacks; int received_bytes; + int importCount; int m_itemCnt; int m_itemTotal; diff --git a/oscar/oximeterimport.cpp b/oscar/oximeterimport.cpp index feb7087e..29429110 100644 --- a/oscar/oximeterimport.cpp +++ b/oscar/oximeterimport.cpp @@ -647,11 +647,11 @@ void OximeterImport::on_radioSyncOximeter_clicked() ui->syncCPAPGroup->setVisible(false); if ( oximodule ) { if (oximodule->isStartTimeValid()) { - qDebug() << "oximod - Oximeter time is valid " << oximodule->startTime().toString("yyyy-MMM-dd HH:mm:ssap"); + qDebug() << "oximod - Oximeter time is " << oximodule->startTime().toString("yyyy-MMM-dd HH:mm:ssap"); ui->calendarWidget->setSelectedDate(oximodule->startTime().date()); ui->dateTimeEdit->setDateTime(oximodule->startTime()); } else { - qDebug() << "oximod - Oximeter time is not valid" << oximodule->startTime().toString("yyyy-MMM-dd HH:mm:ssap"); + qDebug() << "oximod - Oximeter time is faked" << oximodule->startTime().toString("yyyy-MMM-dd HH:mm:ssap"); ui->calendarWidget->setSelectedDate(oximodule->startTime().date()); ui->dateTimeEdit->setDateTime(oximodule->startTime()); }