diff --git a/SleepLib/loader_plugins/prs1_loader.cpp b/SleepLib/loader_plugins/prs1_loader.cpp index cb99a11f..e0aad523 100644 --- a/SleepLib/loader_plugins/prs1_loader.cpp +++ b/SleepLib/loader_plugins/prs1_loader.cpp @@ -932,6 +932,7 @@ bool PRS1Loader::OpenWaveforms(Session *session,QString filename) if (cnt==0) return false; qWarning() << "Corrupt waveform, trying to recover" << sequence; + session->summary[CPAP_BrokenWaveform]=true; // read the damn bytes anyway.. br=f.read((char *)header,lasthl-hl+1); // last bit of the header diff --git a/SleepLib/machine_common.h b/SleepLib/machine_common.h index e847c7bf..51250734 100644 --- a/SleepLib/machine_common.h +++ b/SleepLib/machine_common.h @@ -48,7 +48,7 @@ enum MachineCode//:qint16 BIPAP_EAPAverage,BIPAP_IAPAverage,BIPAP_EAPMin,BIPAP_EAPMax,BIPAP_IAPMin,BIPAP_IAPMax, BIPAP_PSAverage,BIPAP_PSMin, BIPAP_PSMax, - CPAP_BrokenSummary, + CPAP_BrokenSummary, CPAP_BrokenWaveform, // PRS1 Specific Codes PRS1_PressurePulse=0x1000,PRS1_VSnore2, diff --git a/daily.cpp b/daily.cpp index 4927d600..e78bf4c2 100644 --- a/daily.cpp +++ b/daily.cpp @@ -501,7 +501,6 @@ void Daily::Load(QDate date) iap90=cpap->percentile(CPAP_IAP,0,0.9); QString submodel=tr("Unknown Model"); - //html+=""+tr("Machine Information")+"\n"; if (cpap->machine->properties.find("SubModel")!=cpap->machine->properties.end()) submodel="
"+cpap->machine->properties["SubModel"]; @@ -687,13 +686,18 @@ void Daily::Load(QDate date) html+="
"; html+=""; QDateTime fd,ld; + bool corrupted_waveform=false; for (vector::iterator s=cpap->begin();s!=cpap->end();s++) { fd=QDateTime::fromMSecsSinceEpoch((*s)->first()); ld=QDateTime::fromMSecsSinceEpoch((*s)->last()); + if (((*s)->summary.find(CPAP_BrokenWaveform)!=(*s)->summary.end()) && (*s)->summary[CPAP_BrokenWaveform].toBool()) corrupted_waveform=true; tmp.sprintf(("").toLatin1(),(*s)->session()); html+=tmp; } html+="
SessionIDDateStartEnd
%08i"+fd.date().toString(Qt::SystemLocaleShortDate)+""+fd.toString("HH:mm ")+""+ld.toString("HH:mm")+"
"; + if (corrupted_waveform) { + html+="
One or more waveform record for this session had faulty source data. Some waveform overlay points may not match up correctly.
"; + } } html+="";