diff --git a/SleepLib/calcs.cpp b/SleepLib/calcs.cpp index 3ff33442..2261c82b 100644 --- a/SleepLib/calcs.cpp +++ b/SleepLib/calcs.cpp @@ -455,6 +455,8 @@ int calcLeaks(Session *session) if (session->eventlist.contains(CPAP_Leak)) return 0; // abort if already there if (!session->eventlist.contains(CPAP_LeakTotal)) return 0; // can't calculate without this.. + if (session->settings[CPAP_Mode].toInt()>MODE_APAP) return 0; // Don't bother calculating when in APAP mode + const qint64 winsize=3600000; // 5 minute window //qint64 first=session->first(), last=session->last(), f; diff --git a/daily.cpp b/daily.cpp index bb97b48a..28cdd0a5 100644 --- a/daily.cpp +++ b/daily.cpp @@ -861,6 +861,7 @@ void Daily::Load(QDate date) } // if (!CPAP) html+="
"+schema::channel[code].label()+""; html+=" | "+a.sprintf("%.2f",oxi->Min(code)); html+=" | "+a.sprintf("%.2f",oxi->wavg(code)); - html+=" | "+a.sprintf("%.2f",oxi->p90(code)); + html+=" | "+a.sprintf("%.2f",oxi->percentile(code,percentile)); html+=" | "+a.sprintf("%.2f",oxi->Max(code)); html+=" |