mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 18:50:44 +00:00
ResMed overlapping 1 second out session fix
This commit is contained in:
parent
ba2cd0b3ec
commit
5b631e2c83
@ -222,10 +222,10 @@ void TAPData::Reload(Day *day)
|
||||
} else {
|
||||
double d=last.msecsTo(ev.time())/1000.0;
|
||||
|
||||
//assert(lastval<max_slots);
|
||||
assert(lastval<max_slots);
|
||||
if (lastval>max_slots) {
|
||||
int i=0;
|
||||
throw BoundsError();
|
||||
// throw BoundsError();
|
||||
}
|
||||
pTime[lastval]+=d;
|
||||
}
|
||||
|
@ -241,6 +241,11 @@ bool ResmedLoader::Open(QString & path,Profile *profile)
|
||||
datestr=filename.section("_",0,1);
|
||||
date=QDateTime::fromString(datestr,"yyyyMMdd_HHmmss");
|
||||
sessionid=date.toTime_t();
|
||||
// Resmed bugs up on the session filenames.. 1 second either way
|
||||
if (sessfiles.find(sessionid)==sessfiles.end()) {
|
||||
if (sessfiles.find(sessionid+1)!=sessfiles.end()) sessionid++;
|
||||
if (sessfiles.find(sessionid-1)!=sessfiles.end()) sessionid--;
|
||||
}
|
||||
|
||||
sessfiles[sessionid].push_back(fi.canonicalFilePath());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user