From a1e62ed695feaec157f03cc8506a21cefc754d37 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Mon, 2 Jan 2012 17:48:49 +1000 Subject: [PATCH] Forgot to multiply ResMed EPR stuff by signal gain --- Graphs/gSummaryChart.cpp | 1 + SleepLib/loader_plugins/resmed_loader.cpp | 11 ++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Graphs/gSummaryChart.cpp b/Graphs/gSummaryChart.cpp index 3f214207..904f967a 100644 --- a/Graphs/gSummaryChart.cpp +++ b/Graphs/gSummaryChart.cpp @@ -72,6 +72,7 @@ void SummaryChart::SetDay(Day * nullday) addSlice(CPAP_EPAP,QColor("green"),ST_SETMIN,true); addSlice(CPAP_EPAP,QColor("light green"),ST_PERC,true,0.95); + addSlice(CPAP_IPAP,QColor("light cyan"),ST_WAVG,true); addSlice(CPAP_IPAP,QColor("light blue"),ST_PERC,true,0.95); addSlice(CPAP_IPAP,QColor("blue"),ST_SETMAX,true); } else if (mode>=MODE_APAP) { diff --git a/SleepLib/loader_plugins/resmed_loader.cpp b/SleepLib/loader_plugins/resmed_loader.cpp index badd823c..ffe93bab 100644 --- a/SleepLib/loader_plugins/resmed_loader.cpp +++ b/SleepLib/loader_plugins/resmed_loader.cpp @@ -604,12 +604,11 @@ int ResmedLoader::Open(QString & path,Profile *profile) // Note: AutoSV machines don't have both fields sig=stredf.lookupSignal(RMS9_EPR); if (sig) { - int i=sig->data[dn]; - sess->settings[CPAP_PresReliefMode]=i; + sess->settings[CPAP_PresReliefMode]=EventDataType(sig->data[dn])*sig->gain; } sig=stredf.lookupSignal(RMS9_EPRSet); if (sig) { - sess->settings[CPAP_PresReliefSet]=sig->data[dn]; + sess->settings[CPAP_PresReliefSet]=EventDataType(sig->data[dn])*sig->gain; } @@ -981,14 +980,12 @@ int ResmedLoader::Open(QString & path,Profile *profile) // AutoSV machines don't have both fields sig=stredf.lookupSignal(RMS9_EPR); if (sig) { - int i=sig->data[dn]; - sess->settings[CPAP_PresReliefMode]=i; - + sess->settings[CPAP_PresReliefMode]=EventDataType(sig->data[dn])*sig->gain; } sig=stredf.lookupSignal(RMS9_EPRSet); if (sig) { - sess->settings[CPAP_PresReliefSet]=sig->data[dn]; + sess->settings[CPAP_PresReliefSet]=EventDataType(sig->data[dn])*sig->gain; }