diff --git a/sleepyhead/SleepLib/loader_plugins/cms50f37_loader.cpp b/sleepyhead/SleepLib/loader_plugins/cms50f37_loader.cpp index bad1b254..05516647 100644 --- a/sleepyhead/SleepLib/loader_plugins/cms50f37_loader.cpp +++ b/sleepyhead/SleepLib/loader_plugins/cms50f37_loader.cpp @@ -186,7 +186,8 @@ QString CMS50F37Loader::getUser() QString CMS50F37Loader::getVendor() { - vendor = QString(); + if (!vendor.isEmpty()) return vendor; + sendCommand(COMMAND_GET_OXIMETER_VENDOR); QTime time; @@ -199,7 +200,8 @@ QString CMS50F37Loader::getVendor() QString CMS50F37Loader::getModel() { - model = QString(); + if (!model.isEmpty()) return model; + sendCommand(COMMAND_GET_OXIMETER_MODEL); QTime time; diff --git a/sleepyhead/oximeterimport.cpp b/sleepyhead/oximeterimport.cpp index f8251f70..3f21df42 100644 --- a/sleepyhead/oximeterimport.cpp +++ b/sleepyhead/oximeterimport.cpp @@ -254,16 +254,16 @@ void OximeterImport::on_directImportButton_clicked() ui->tableOxiSessions->setItem(i, 1, item); item->setFlags(item->flags() & ~Qt::ItemIsEditable); - item = new QTableWidgetItem(tr("%1 Session #%2").arg(oximodule->loaderName()).arg(i+1, 0)); + item = new QTableWidgetItem(tr("%1 Session #%2").arg(oximodule->getModel()).arg(i+1, 0)); ui->tableOxiSessions->setItem(i, 2, item); item->setFlags(item->flags() & ~Qt::ItemIsEditable); } selecting_session = true; - ui->tableOxiSessions->selectRow(chosen_session = 0); + ui->tableOxiSessions->selectRow(0); return; } else { - chosen_session = 0; + chosen_sessions.push_back(0); oximodule->getDuration(0); oximodule->setStartTime(oximodule->getDateTime(0)); } @@ -284,7 +284,8 @@ void OximeterImport::doImport() oximodule->Open("import"); if (oximodule->commandDriven()) { - oximodule->getSessionData(chosen_session); + int chosen=chosen_sessions.takeFirst(); + oximodule->getSessionData(chosen); } // Wait to start import streaming.. @@ -990,7 +991,7 @@ void OximeterImport::on_chooseSessionButton_clicked() if (selecting_session) { ui->stackedWidget->setCurrentWidget(ui->directImportPage); - chosen_session = item->data(Qt::UserRole).toInt(); + chosen_sessions.push_back(item->data(Qt::UserRole).toInt()); // go back and start import doImport(); diff --git a/sleepyhead/oximeterimport.h b/sleepyhead/oximeterimport.h index 0ff9f6d5..f5c87b54 100644 --- a/sleepyhead/oximeterimport.h +++ b/sleepyhead/oximeterimport.h @@ -106,8 +106,7 @@ private: int spo2; bool selecting_session; - int chosen_session; - + QList chosen_sessions; }; #endif // OXIMETERIMPORT_H diff --git a/sleepyhead/oximeterimport.ui b/sleepyhead/oximeterimport.ui index f26c5241..5d4e6178 100644 --- a/sleepyhead/oximeterimport.ui +++ b/sleepyhead/oximeterimport.ui @@ -1349,7 +1349,7 @@ background: qlineargradient( x1:0 y1:0, x2:1 y2:0, stop:0 white, stop:1 #cccccc) - Import Time + Start Time