mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-16 18:50:46 +00:00
Better ResMed SDCard backup, keep monthly STR.edf copy
This commit is contained in:
parent
65540d1b51
commit
1ce3423f8c
@ -510,12 +510,6 @@ bool PRS1Loader::ParseSummary(Machine *mach, qint32 sequence, quint32 timestamp,
|
|||||||
//avg_tidalvol=EventDataType(data[0x39])*10.0; // Average Tidal Volume
|
//avg_tidalvol=EventDataType(data[0x39])*10.0; // Average Tidal Volume
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
min=float(data[0x03])/10.0; // Min EPAP
|
min=float(data[0x03])/10.0; // Min EPAP
|
||||||
max=float(data[0x04])/10.0; // Max EPAP
|
max=float(data[0x04])/10.0; // Max EPAP
|
||||||
int offset=0;
|
int offset=0;
|
||||||
|
@ -449,20 +449,38 @@ int ResmedLoader::Open(QString & path,Profile *profile)
|
|||||||
QFile::copy(path+RMS9_STR_idfile+STR_ext_TGT,backup_path+RMS9_STR_idfile+STR_ext_TGT);
|
QFile::copy(path+RMS9_STR_idfile+STR_ext_TGT,backup_path+RMS9_STR_idfile+STR_ext_TGT);
|
||||||
QFile::copy(path+RMS9_STR_idfile+STR_ext_CRC,backup_path+RMS9_STR_idfile+STR_ext_CRC);
|
QFile::copy(path+RMS9_STR_idfile+STR_ext_CRC,backup_path+RMS9_STR_idfile+STR_ext_CRC);
|
||||||
|
|
||||||
|
QDateTime dts=QDateTime::fromMSecsSinceEpoch(stredf.startdate);
|
||||||
|
dir.mkpath(backup_path+"STR_Backup");
|
||||||
|
QString strmonthly=backup_path+"STR_Backup/STR-"+dts.toString("yyyyMM")+"."+STR_ext_EDF;
|
||||||
|
|
||||||
//copy STR files to backup folder
|
//copy STR files to backup folder
|
||||||
if (strpath.endsWith(STR_ext_gz)) // Already compressed.
|
if (strpath.endsWith(STR_ext_gz)) { // Already compressed. Don't bother decompressing..
|
||||||
QFile::copy(strpath,backup_path+RMS9_STR_strfile+STR_ext_EDF+STR_ext_gz);
|
QFile::copy(strpath,backup_path+RMS9_STR_strfile+STR_ext_EDF+STR_ext_gz);
|
||||||
else { // Compress STR file to backup folder
|
} else { // Compress STR file to backup folder
|
||||||
QString strf=backup_path+RMS9_STR_strfile+STR_ext_EDF;
|
QString strf=backup_path+RMS9_STR_strfile+STR_ext_EDF;
|
||||||
|
|
||||||
|
// Copy most recent to STR.edf
|
||||||
if (QFile::exists(strf))
|
if (QFile::exists(strf))
|
||||||
QFile::remove(strf);
|
QFile::remove(strf);
|
||||||
|
|
||||||
|
if (QFile::exists(strf+STR_ext_gz))
|
||||||
|
QFile::remove(strf+STR_ext_gz);
|
||||||
|
|
||||||
compress_backups ?
|
compress_backups ?
|
||||||
compressFile(strpath,strf)
|
compressFile(strpath,strf)
|
||||||
:
|
:
|
||||||
QFile::copy(strpath,strf);
|
QFile::copy(strpath,strf);
|
||||||
|
|
||||||
|
}
|
||||||
|
// Keep one STR.edf backup every month
|
||||||
|
if (!QFile::exists(strmonthly) && !QFile::exists(strmonthly+".gz")) {
|
||||||
|
compress_backups ?
|
||||||
|
compressFile(strpath,strmonthly)
|
||||||
|
:
|
||||||
|
QFile::copy(strpath,strmonthly);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Meh..
|
||||||
QFile::copy(path+"STR.crc",backup_path+"STR.crc");
|
QFile::copy(path+"STR.crc",backup_path+"STR.crc");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -551,95 +569,120 @@ int ResmedLoader::Open(QString & path,Profile *profile)
|
|||||||
// Open DATALOG file and build list of session files
|
// Open DATALOG file and build list of session files
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks);
|
QStringList dirs;
|
||||||
dir.setSorting(QDir::Name);
|
dirs.push_back(newpath);
|
||||||
|
dir.setFilter(QDir::Dirs | QDir::Hidden | QDir::NoDotAndDotDot);
|
||||||
QFileInfoList flist=dir.entryInfoList();
|
QFileInfoList flist=dir.entryInfoList();
|
||||||
|
bool ok;
|
||||||
|
for (int i=0;i<flist.size();i++) {
|
||||||
|
QFileInfo fi=flist.at(i);
|
||||||
|
filename=fi.fileName();
|
||||||
|
if (filename.length()==4) {
|
||||||
|
filename.toInt(&ok);
|
||||||
|
if (ok) {
|
||||||
|
dirs.push_back(fi.canonicalFilePath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString datestr;
|
QString datestr;
|
||||||
SessionID sessionid;
|
SessionID sessionid;
|
||||||
QDateTime date;
|
QDateTime date;
|
||||||
int size=flist.size();
|
QString fullname;
|
||||||
|
|
||||||
sessfiles.clear();
|
|
||||||
bool gz;
|
bool gz;
|
||||||
|
int size;
|
||||||
QMap<SessionID,QStringList>::iterator si;
|
QMap<SessionID,QStringList>::iterator si;
|
||||||
|
|
||||||
// For each file in flist...
|
sessfiles.clear();
|
||||||
for (int i=0;i<size;i++) {
|
|
||||||
QFileInfo fi=flist.at(i);
|
|
||||||
filename=fi.fileName();
|
|
||||||
|
|
||||||
// Forget about it if it can't be read.
|
for (int dc=0;dc<dirs.size();dc++) {
|
||||||
if (!fi.isReadable())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Accept only .edf and .edf.gz files
|
dir.setPath(dirs.at(dc));
|
||||||
if (filename.right(4).toLower() != "."+STR_ext_EDF) {
|
dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks);
|
||||||
|
dir.setSorting(QDir::Name);
|
||||||
|
flist=dir.entryInfoList();
|
||||||
|
|
||||||
if (filename.right(7).toLower() != "."+STR_ext_EDF+STR_ext_gz)
|
size=flist.size();
|
||||||
|
|
||||||
|
|
||||||
|
// For each file in flist...
|
||||||
|
for (int i=0;i<size;i++) {
|
||||||
|
QFileInfo fi=flist.at(i);
|
||||||
|
filename=fi.fileName();
|
||||||
|
|
||||||
|
// Forget about it if it can't be read.
|
||||||
|
if (!fi.isReadable())
|
||||||
continue;
|
continue;
|
||||||
gz=true;
|
|
||||||
} else gz=false;
|
|
||||||
|
|
||||||
// Extract the session date out of the filename
|
// Accept only .edf and .edf.gz files
|
||||||
datestr=filename.section("_",0,1);
|
if (filename.right(4).toLower() != "."+STR_ext_EDF) {
|
||||||
|
|
||||||
// Take the filename's date, and
|
if (filename.right(7).toLower() != "."+STR_ext_EDF+STR_ext_gz)
|
||||||
date=QDateTime::fromString(datestr,"yyyyMMdd_HHmmss");
|
continue;
|
||||||
date=date.toUTC();
|
gz=true;
|
||||||
|
} else gz=false;
|
||||||
|
|
||||||
// Skip file if dates invalid, the filename is clearly wrong..
|
fullname=fi.canonicalFilePath();
|
||||||
if (!date.isValid())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// convert this date to UNIX epoch to form the sessionID
|
// Extract the session date out of the filename
|
||||||
sessionid=date.toTime_t();
|
datestr=filename.section("_",0,1);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////
|
// Take the filename's date, and
|
||||||
// Resmed bugs up on the session filenames.. More than these 3 seconds
|
date=QDateTime::fromString(datestr,"yyyyMMdd_HHmmss");
|
||||||
|
date=date.toUTC();
|
||||||
|
|
||||||
// Moral of the story, when writing firmware and saving in batches, use the same datetimes,
|
// Skip file if dates invalid, the filename is clearly wrong..
|
||||||
// and provide firmware updates for free to your customers.
|
if (!date.isValid())
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////
|
continue;
|
||||||
si=sessfiles.find(sessionid);
|
|
||||||
|
|
||||||
if (si==sessfiles.end()) {
|
// convert this date to UNIX epoch to form the sessionID
|
||||||
// Scan 3 seconds either way for sessions..
|
sessionid=date.toTime_t();
|
||||||
for (int j=1;j<3;j++) {
|
|
||||||
|
|
||||||
if ((si=sessfiles.find(sessionid+j)) != sessfiles.end()) {
|
////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
sessionid+=j;
|
// Resmed bugs up on the session filenames.. More than these 3 seconds
|
||||||
break;
|
|
||||||
} else if ((si=sessfiles.find(sessionid-j)) != sessfiles.end()) {
|
// Moral of the story, when writing firmware and saving in batches, use the same datetimes,
|
||||||
sessionid-=j;
|
// and provide firmware updates for free to your customers.
|
||||||
break;
|
////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
si=sessfiles.find(sessionid);
|
||||||
|
|
||||||
|
if (si==sessfiles.end()) {
|
||||||
|
// Scan 3 seconds either way for sessions..
|
||||||
|
for (int j=1;j<3;j++) {
|
||||||
|
|
||||||
|
if ((si=sessfiles.find(sessionid+j)) != sessfiles.end()) {
|
||||||
|
sessionid+=j;
|
||||||
|
break;
|
||||||
|
} else if ((si=sessfiles.find(sessionid-j)) != sessfiles.end()) {
|
||||||
|
sessionid-=j;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Push current filename to ordered-by-sessionid list
|
// Push current filename to ordered-by-sessionid list
|
||||||
if (si!=sessfiles.end()) {
|
if (si!=sessfiles.end()) {
|
||||||
// Ignore if already compressed version of the same file exists.. (just in case)
|
// Ignore if already compressed version of the same file exists.. (just in case)
|
||||||
if (!gz) {
|
if (!gz) {
|
||||||
if (si.value().contains(filename+STR_ext_gz,Qt::CaseInsensitive))
|
if (si.value().contains(fullname+STR_ext_gz,Qt::CaseInsensitive))
|
||||||
continue;
|
continue;
|
||||||
|
} else {
|
||||||
|
QString str=fullname;
|
||||||
|
str.chop(3);
|
||||||
|
if (si.value().contains(str,Qt::CaseInsensitive))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
si.value().push_back(fullname);
|
||||||
} else {
|
} else {
|
||||||
QString str=filename;
|
sessfiles[sessionid].push_back(fullname);
|
||||||
str.chop(3);
|
|
||||||
if (si.value().contains(str,Qt::CaseInsensitive))
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
si.value().push_back(filename);
|
if ((i % 20)==0) {
|
||||||
} else {
|
// Update the progress bar
|
||||||
sessfiles[sessionid].push_back(filename);
|
if (qprogress) qprogress->setValue((float(i+1)/float(size)*10.0));
|
||||||
}
|
QApplication::processEvents();
|
||||||
|
}
|
||||||
if ((i % 10)==0) {
|
|
||||||
// Update the progress bar
|
|
||||||
if (qprogress) qprogress->setValue((float(i+1)/float(size)*10.0));
|
|
||||||
QApplication::processEvents();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1066,6 +1109,7 @@ int ResmedLoader::Open(QString & path,Profile *profile)
|
|||||||
// }
|
// }
|
||||||
backup_path+=RMS9_STR_datalog+"/";
|
backup_path+=RMS9_STR_datalog+"/";
|
||||||
|
|
||||||
|
QString backupfile,backfile, crcfile, yearstr, bkuppath;
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Scan through new file list and import sessions
|
// Scan through new file list and import sessions
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@ -1078,20 +1122,28 @@ int ResmedLoader::Open(QString & path,Profile *profile)
|
|||||||
|
|
||||||
// Create the session
|
// Create the session
|
||||||
sess=new Session(m,sessionid);
|
sess=new Session(m,sessionid);
|
||||||
QString fullpath,backupfile,backfile, crcfile;
|
|
||||||
|
|
||||||
// Process EDF File List
|
// Process EDF File List
|
||||||
for (int i=0;i<si.value().size();++i) {
|
for (int i=0;i<si.value().size();++i) {
|
||||||
filename=si.value()[i];
|
fullname=si.value()[i];
|
||||||
|
filename=fullname.section("/",-1);
|
||||||
gz=(filename.right(3).toLower()==STR_ext_gz);
|
gz=(filename.right(3).toLower()==STR_ext_gz);
|
||||||
fullpath=newpath+filename;
|
|
||||||
|
|
||||||
|
yearstr=filename.left(4);
|
||||||
|
bkuppath=backup_path;
|
||||||
|
int year=yearstr.toInt(&ok,10);
|
||||||
|
if (ok) {
|
||||||
|
bkuppath+=yearstr+"/";
|
||||||
|
dir.mkpath(bkuppath);
|
||||||
|
}
|
||||||
|
|
||||||
// Copy the EDF file to the backup folder
|
// Copy the EDF file to the backup folder
|
||||||
if (create_backups) {
|
if (create_backups) {
|
||||||
backupfile=backup_path+filename;
|
backupfile=bkuppath+filename;
|
||||||
bool dobackup=true;
|
bool dobackup=true;
|
||||||
if (!gz && QFile::exists(backupfile+STR_ext_gz)) {
|
if (!gz && QFile::exists(backupfile+STR_ext_gz)) {
|
||||||
dobackup=false;
|
dobackup=false; // gzipped edf.. assume it's already a backup
|
||||||
} else if (QFile::exists(backupfile)) {
|
} else if (QFile::exists(backupfile)) {
|
||||||
if (gz) {
|
if (gz) {
|
||||||
// don't bother, it's already there and compressed.
|
// don't bother, it's already there and compressed.
|
||||||
@ -1109,12 +1161,12 @@ int ResmedLoader::Open(QString & path,Profile *profile)
|
|||||||
if (dobackup) {
|
if (dobackup) {
|
||||||
if (!gz) {
|
if (!gz) {
|
||||||
compress_backups ?
|
compress_backups ?
|
||||||
compressFile(fullpath, backupfile)
|
compressFile(fullname, backupfile)
|
||||||
:
|
:
|
||||||
QFile::copy(fullpath, backupfile);
|
QFile::copy(fullname, backupfile);
|
||||||
} else {
|
} else {
|
||||||
// already compressed, just copy it.
|
// already compressed, just copy it.
|
||||||
QFile::copy(fullpath, backupfile);
|
QFile::copy(fullname, backupfile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1124,12 +1176,12 @@ int ResmedLoader::Open(QString & path,Profile *profile)
|
|||||||
backfile=filename.replace(".edf.gz",".crc",Qt::CaseInsensitive);
|
backfile=filename.replace(".edf.gz",".crc",Qt::CaseInsensitive);
|
||||||
}
|
}
|
||||||
|
|
||||||
backupfile=backup_path+backfile;
|
backupfile=bkuppath+backfile;
|
||||||
crcfile=newpath+backfile;
|
crcfile=newpath+backfile;
|
||||||
QFile::copy(crcfile, backupfile);
|
QFile::copy(crcfile, backupfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
EDFParser edf(fullpath);
|
EDFParser edf(fullname);
|
||||||
|
|
||||||
// Parse the actual file
|
// Parse the actual file
|
||||||
if (!edf.Parse())
|
if (!edf.Parse())
|
||||||
@ -1151,42 +1203,59 @@ int ResmedLoader::Open(QString & path,Profile *profile)
|
|||||||
if (qprogress) qprogress->setValue(10.0+(float(cnt)/float(size)*90.0));
|
if (qprogress) qprogress->setValue(10.0+(float(cnt)/float(size)*90.0));
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
}
|
}
|
||||||
|
int mode=0;
|
||||||
|
EventDataType prset=0, prmode=0;
|
||||||
|
qint64 dif;
|
||||||
|
int dn;
|
||||||
|
|
||||||
if (!sess) continue;
|
if (!sess) continue;
|
||||||
if (!sess->first()) {
|
if (!sess->first()) {
|
||||||
delete sess;
|
delete sess;
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
sess->SetChanged(true);
|
sess->SetChanged(true);
|
||||||
|
|
||||||
qint64 dif=sess->first()-stredf.startdate;
|
dif=sess->first()-stredf.startdate;
|
||||||
|
|
||||||
int dn=dif/86400000L;
|
dn=dif/86400000L;
|
||||||
int mode;
|
if (dn>=days-2) {
|
||||||
EventDataType prset, prmode;
|
int i=5;
|
||||||
if (dn<days) {
|
}
|
||||||
|
if ((dn>=0) && (dn<days)) {
|
||||||
sig=stredf.lookupSignal(CPAP_Mode);
|
sig=stredf.lookupSignal(CPAP_Mode);
|
||||||
if (sig) {
|
if (sig) {
|
||||||
mode=sig->data[dn];
|
mode=sig->data[dn];
|
||||||
} else mode=0;
|
} else mode=0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sess->settings[CPAP_PresReliefType]=PR_EPR;
|
sess->settings[CPAP_PresReliefType]=PR_EPR;
|
||||||
|
|
||||||
|
// Ramp, Fulltime
|
||||||
// AutoSV machines don't have both fields
|
// AutoSV machines don't have both fields
|
||||||
sig=stredf.lookupSignal(RMS9_EPR);
|
sig=stredf.lookupSignal(RMS9_EPR);
|
||||||
if (sig) {
|
if (sig) {
|
||||||
prmode=EventDataType(sig->data[dn])*sig->gain;
|
prmode=EventDataType(sig->data[dn])*sig->gain;
|
||||||
if (prmode>sig->physical_maximum) {
|
// Off,
|
||||||
|
if (prmode<0) {
|
||||||
|
// Kaart's data has -1 here.. Not sure what it means.
|
||||||
|
prmode=0;
|
||||||
|
} else if (prmode > sig->physical_maximum) {
|
||||||
int i=5;
|
int i=5;
|
||||||
|
prmode=sig->physical_maximum;
|
||||||
}
|
}
|
||||||
|
// My VPAP (using EasyBreathe) and JM's Elite (using none) have 0
|
||||||
sess->settings[CPAP_PresReliefMode]=prmode;
|
sess->settings[CPAP_PresReliefMode]=prmode;
|
||||||
}
|
}
|
||||||
|
|
||||||
sig=stredf.lookupSignal(RMS9_EPRSet);
|
sig=stredf.lookupSignal(RMS9_EPRSet);
|
||||||
if (sig) {
|
if (sig) {
|
||||||
prset=EventDataType(sig->data[dn])*sig->gain;
|
prset=EventDataType(sig->data[dn])*sig->gain;
|
||||||
if (prset>sig->physical_maximum) {
|
if (prset > sig->physical_maximum) {
|
||||||
int i=5;
|
prset=sig->physical_maximum;
|
||||||
|
} else if (prset < sig->physical_minimum) {
|
||||||
|
prset=sig->physical_minimum;
|
||||||
}
|
}
|
||||||
sess->settings[CPAP_PresReliefSet]=prset;
|
sess->settings[CPAP_PresReliefSet]=prset;
|
||||||
}
|
}
|
||||||
@ -1275,13 +1344,30 @@ int ResmedLoader::Open(QString & path,Profile *profile)
|
|||||||
// The following only happens when the STR.edf file is not up to date..
|
// The following only happens when the STR.edf file is not up to date..
|
||||||
// This will only happen when the user fails to back up their SDcard properly.
|
// This will only happen when the user fails to back up their SDcard properly.
|
||||||
// Basically takes a guess.
|
// Basically takes a guess.
|
||||||
|
bool dodgy=false;
|
||||||
if (!sess->settings.contains(CPAP_Mode)) {
|
if (!sess->settings.contains(CPAP_Mode)) {
|
||||||
//The following is a lame assumption if 50th percentile == max, then it's CPAP
|
//The following is a lame assumption if 50th percentile == max, then it's CPAP
|
||||||
EventDataType p50=sess->percentile(CPAP_Pressure,0.50);
|
|
||||||
EventDataType max=sess->Max(CPAP_Pressure);
|
EventDataType max=sess->Max(CPAP_Pressure);
|
||||||
if (max==p50) {
|
EventDataType p50=sess->percentile(CPAP_Pressure,0.60);
|
||||||
|
EventDataType p502=sess->percentile(CPAP_MaskPressure,0.60);
|
||||||
|
p50=qMax(p50, p502);
|
||||||
|
if (max==0) {
|
||||||
|
dodgy=true;
|
||||||
|
} else if (qAbs(max-p50)<1.8) {
|
||||||
|
max=round(max*10.0)/10.0;
|
||||||
sess->settings[CPAP_Mode]=MODE_CPAP;
|
sess->settings[CPAP_Mode]=MODE_CPAP;
|
||||||
sess->settings[CPAP_PressureMin]=p50;
|
if (max<1) {
|
||||||
|
int i=5;
|
||||||
|
}
|
||||||
|
sess->settings[CPAP_PressureMin]=max;
|
||||||
|
EventDataType epr=round(sess->Max(CPAP_EPAP)*10.0)/10.0;
|
||||||
|
int i=max-epr;
|
||||||
|
sess->settings[CPAP_PresReliefType]=PR_EPR;
|
||||||
|
prmode=(i>0) ? 0 : 1;
|
||||||
|
sess->settings[CPAP_PresReliefMode]=prmode;
|
||||||
|
sess->settings[CPAP_PresReliefSet]=i;
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// It's not cpap, so just take the highest setting for this machines history.
|
// It's not cpap, so just take the highest setting for this machines history.
|
||||||
// This may fail if the missing str data is at the beginning of a fresh import.
|
// This may fail if the missing str data is at the beginning of a fresh import.
|
||||||
@ -1296,7 +1382,8 @@ int ResmedLoader::Open(QString & path,Profile *profile)
|
|||||||
//Rather than take a dodgy guess, EPR settings can take a hit, and this data can simply be missed..
|
//Rather than take a dodgy guess, EPR settings can take a hit, and this data can simply be missed..
|
||||||
|
|
||||||
// Add the session to the machine & profile objects
|
// Add the session to the machine & profile objects
|
||||||
m->AddSession(sess,profile);
|
//if (!dodgy)
|
||||||
|
m->AddSession(sess,profile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1811,7 +1898,7 @@ bool ResmedLoader::LoadPLD(Session *sess,EDFParser &edf)
|
|||||||
code=CPAP_Pressure; //TherapyPressure;
|
code=CPAP_Pressure; //TherapyPressure;
|
||||||
a=ToTimeDelta(sess,edf,es, code,recs,duration,0,0);
|
a=ToTimeDelta(sess,edf,es, code,recs,duration,0,0);
|
||||||
} else if (es.label=="Insp Pressure") {
|
} else if (es.label=="Insp Pressure") {
|
||||||
code=CPAP_IPAP; //TherapyPressure;
|
code=CPAP_IPAP;
|
||||||
sess->settings[CPAP_Mode]=MODE_BIPAP;
|
sess->settings[CPAP_Mode]=MODE_BIPAP;
|
||||||
a=ToTimeDelta(sess,edf,es, code,recs,duration,0,0);
|
a=ToTimeDelta(sess,edf,es, code,recs,duration,0,0);
|
||||||
} else if ((es.label=="MV") || (es.label=="VM")){
|
} else if ((es.label=="MV") || (es.label=="VM")){
|
||||||
|
Loading…
Reference in New Issue
Block a user