diff --git a/SleepLib/loader_plugins/resmed_loader.cpp b/SleepLib/loader_plugins/resmed_loader.cpp index 1d9b04b8..d2b4eb0b 100644 --- a/SleepLib/loader_plugins/resmed_loader.cpp +++ b/SleepLib/loader_plugins/resmed_loader.cpp @@ -488,6 +488,7 @@ void ResmedLoader::ToTimeDelta(Machine *mach,Session *sess,EDFParser &edf, qint1 last=c; } + sess->AddEvent(new Event(tt,code,&c,1)); // add one at the end.. } bool ResmedLoader::LoadSAD(Machine *mach,Session *sess,EDFParser &edf) { @@ -497,6 +498,11 @@ bool ResmedLoader::LoadSAD(Machine *mach,Session *sess,EDFParser &edf) bool ResmedLoader::LoadPLD(Machine *mach,Session *sess,EDFParser &edf) { + // Is it save to assume the order does not change here? + enum PLDType { MaskPres=0, TherapyPres, ExpPress, Leak, RR, Vt, Mv, SnoreIndex, FFLIndex, U1, U2 }; + + //qDebug(edf.edfsignals[MaskPres]->label.toLatin1()); + QString t; for (int s=0;s<edf.GetNumSignals();s++) { long recs=edf.edfsignals[s]->nr*edf.GetNumDataRecords(); @@ -507,12 +513,15 @@ bool ResmedLoader::LoadPLD(Machine *mach,Session *sess,EDFParser &edf) sess->set_hours(duration/3600.0); } MachineCode code; + // if (s==TherapyPres) { +// for (int i=0;i<recs;i++) qDebug("%04i %i",i,edf.edfsignals[s]->data[i]); +// } else if (edf.edfsignals[s]->label=="Snore Index") { code=CPAP_Snore; ToTimeDelta(mach,sess,edf,edf.edfsignals[s]->data, code,recs,duration); - } else if (edf.edfsignals[s]->label=="Mask Pres") { + } else if (edf.edfsignals[s]->label=="Therapy Pres") { code=CPAP_Pressure; - ToTimeDelta(mach,sess,edf,edf.edfsignals[s]->data, code,recs,duration,50.0); + ToTimeDelta(mach,sess,edf,edf.edfsignals[s]->data, code,recs,duration,100.0); //50.0 } else if (edf.edfsignals[s]->label=="MV") { code=CPAP_MinuteVentilation; //ToTimeDelta(mach,sess,edf,edf.edfsignals[s]->data, code,recs,duration,1.0); diff --git a/daily.cpp b/daily.cpp index 18669f5a..a624d8fe 100644 --- a/daily.cpp +++ b/daily.cpp @@ -650,10 +650,12 @@ void Daily::Load(QDate date) MV->show(); TV->show(); RR->show(); + FLG->show(); } else { MV->hide(); TV->hide(); RR->hide(); + FLG->hide(); } if (oxi) { diff --git a/mainwindow.cpp b/mainwindow.cpp index b6a4534e..79b3cf30 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -95,9 +95,8 @@ void MainWindow::Startup() daily=new Daily(ui->tabWidget,shared_context); ui->tabWidget->addTab(daily,tr("Daily")); - // Disabled Overview until I want to actually look at it again. :) - //overview=new Overview(ui->tabWidget,shared_context); - //ui->tabWidget->addTab(overview,tr("Overview")); + overview=new Overview(ui->tabWidget,shared_context); + ui->tabWidget->addTab(overview,tr("Overview")); qprogress->hide(); qstatus->setText(tr("Ready")); @@ -107,7 +106,6 @@ void MainWindow::on_action_Import_Data_triggered() { QStringList dirNames; QFileDialog qfd(this); - //qfddir = QFileDialog::getOpenFileName(this,tr("Import Folder"), "", tr("Folders")); qfd.setFileMode(QFileDialog::DirectoryOnly); if (qfd.exec()) { @@ -148,11 +146,8 @@ void MainWindow::on_homeButton_clicked() { QString file="qrc:/docs/index.html"; QUrl url(file); - //QResource res(file); - //QByteArray html((const char*)res.data(), res.size()); ui->webView->setUrl(url); ui->webView->load(url); - //ui->webView->setHtml(url); //QString(html)); } void MainWindow::on_backButton_clicked()