Only CPAP & APAP ResMed machine modes have EPR

This commit is contained in:
Mark Watkins 2014-10-01 02:24:43 +10:00
parent a8b5d847f9
commit 70b54982d8
2 changed files with 14 additions and 13 deletions

View File

@ -341,21 +341,23 @@ void ResmedLoader::ParseSTR(Machine *mach, QStringList strfiles)
R.max_ipap = R.epap + R.max_ps;
}
EventDataType epr = -1, epr_level = -1;
if ((sig = str.lookupSignal(RMS9_EPR))) {
epr= EventDataType(sig->data[rec]) * sig->gain + sig->offset;
}
if ((sig = str.lookupSignal(RMS9_EPRLevel))) {
epr_level= EventDataType(sig->data[rec]) * sig->gain + sig->offset;
}
if ((mode == MODE_CPAP) || (mode == MODE_APAP)) {
if ((sig = str.lookupSignal(RMS9_EPR))) {
epr= EventDataType(sig->data[rec]) * sig->gain + sig->offset;
}
if ((sig = str.lookupSignal(RMS9_EPRLevel))) {
epr_level= EventDataType(sig->data[rec]) * sig->gain + sig->offset;
}
if ((sig = str.lookupLabel("S.EPR.EPRType"))) {
epr = EventDataType(sig->data[rec]) * sig->gain + sig->offset;
epr += 1;
if ((sig = str.lookupLabel("S.EPR.EPRType"))) {
epr = EventDataType(sig->data[rec]) * sig->gain + sig->offset;
epr += 1;
}
}
if ((epr >= 0) && (epr_level >= 0)) {
R.epr_level = epr_level;
R.epr = epr;
@ -376,7 +378,6 @@ void ResmedLoader::ParseSTR(Machine *mach, QStringList strfiles)
}
if ((sig = str.lookupLabel("AHI"))) {
R.ahi = EventDataType(sig->data[rec]) * sig->gain + sig->offset;
}

View File

@ -315,10 +315,10 @@ MainWindow::MainWindow(QWidget *parent) :
warnmsg.push_back(tr("<b>Warning:</b> This is a pre-release build, and may at times show unstable behaviour. It is intended for testing purposes."));
warnmsg.push_back(tr("If you experience CPAP chart/data errors after upgrading to a new version, try rebuilding your CPAP database from the Data menu."));
warnmsg.push_back(tr("Make sure your keep your SleepyHead data folder backed up when trying testing versions."));
warnmsg.push_back(tr("Make sure you keep your SleepyHead data folder backed up when trying testing versions."));
warnmsg.push_back(tr("Please ensure you are running the latest version before reporting any bugs."));
warnmsg.push_back(tr("When reporting bugs, please make sure to supply the SleepyHead version number, operating system details and CPAP machine model."));
warnmsg.push_back(tr("Make sure your willing and able to supply a .zip of your CPAP data or a crash report before you think about filing a bug report."));
warnmsg.push_back(tr("Make sure you're willing and able to supply a .zip of your CPAP data or a crash report before you think about filing a bug report."));
warnmsg.push_back(tr("Think twice before filing a bug report that already exists, PLEASE search first, as your likely not the first one to notice it!"));
warnmsg.push_back(tr("This red message line is intentional, and will not be a feature in the final version..."));
warnmsg.push_back(tr(""));