mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
PRS1 Pressure Summary fixes
This commit is contained in:
parent
f86030e551
commit
9649cb337c
@ -173,6 +173,7 @@ EventDataType Day::percentile(ChannelID code,EventDataType percentile)
|
||||
EventDataType lastgain=0, gain=0;
|
||||
// First Calculate count of all events
|
||||
bool timeweight;
|
||||
|
||||
for (s=sessions.begin();s!=sessions.end();s++) {
|
||||
if (!(*s)->enabled()) continue;
|
||||
|
||||
|
@ -623,7 +623,7 @@ bool PRS1Loader::Parse002v5(qint32 sequence, quint32 timestamp, unsigned char *b
|
||||
//EventList * PRESSURE=NULL;
|
||||
//EventList * PP=NULL;
|
||||
|
||||
EventDataType data[10],tmp;
|
||||
EventDataType data[10];//,tmp;
|
||||
|
||||
|
||||
//qint64 start=timestamp;
|
||||
@ -856,6 +856,9 @@ bool PRS1Loader::Parse002v5(qint32 sequence, quint32 timestamp, unsigned char *b
|
||||
session->settings[CPAP_IPAPHi]=session->Max(CPAP_IPAPHi);
|
||||
session->settings[CPAP_PSMax]=session->Max(CPAP_IPAPHi) - session->Min(CPAP_EPAP);
|
||||
session->settings[CPAP_PSMin]=session->Min(CPAP_IPAPLo) - session->Min(CPAP_EPAP);
|
||||
|
||||
session->m_valuesummary[CPAP_Pressure].clear();
|
||||
session->m_valuesummary.erase(session->m_valuesummary.find(CPAP_Pressure));
|
||||
return true;
|
||||
|
||||
}
|
||||
@ -1069,6 +1072,9 @@ bool PRS1Loader::Parse002(qint32 sequence, quint32 timestamp, unsigned char *buf
|
||||
session->m_cph.clear();
|
||||
session->m_lastchan.clear();
|
||||
session->m_firstchan.clear();
|
||||
session->m_valuesummary[CPAP_Pressure].clear();
|
||||
session->m_valuesummary.erase(session->m_valuesummary.find(CPAP_Pressure));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -686,9 +686,6 @@ void Session::updateCountSummary(ChannelID code)
|
||||
qint32 len,cnt;
|
||||
quint32 * tptr;
|
||||
EventStoreType * dptr, * eptr;
|
||||
if (code==CPAP_MinuteVent) {
|
||||
int i=5;
|
||||
}
|
||||
for (int i=0;i<ev.value().size();i++) {
|
||||
EventList & e=*(ev.value()[i]);
|
||||
start=e.first();
|
||||
@ -701,12 +698,11 @@ void Session::updateCountSummary(ChannelID code)
|
||||
m_gain[code]=e.gain();
|
||||
|
||||
if (e.type()==EVL_Event) {
|
||||
lastraw=*dptr;
|
||||
lastraw=*dptr++;
|
||||
tptr=e.rawTime();
|
||||
lasttime=start + *tptr;
|
||||
lasttime=start + *tptr++;
|
||||
// Event version
|
||||
|
||||
|
||||
for (;dptr < eptr; dptr++) {
|
||||
time=start + *tptr++;
|
||||
raw=*dptr;
|
||||
|
Loading…
Reference in New Issue
Block a user