From 37107f93f807a98a8830cc40e26145abc3c33ca4 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Wed, 16 Oct 2013 15:18:29 +1000 Subject: [PATCH] F&P Mask Pressure fix (not really Mask Pressure, but verifies FLW import works --- sleepyhead/SleepLib/loader_plugins/icon_loader.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp b/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp index e81ba6e0..b4e210ac 100644 --- a/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp +++ b/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp @@ -423,11 +423,11 @@ bool FPIconLoader::OpenFLW(Machine * mach,QString filename, Profile * profile) // F&P Overwrites this file, not appends to it. flow=new EventList(EVL_Waveform,1.0,0,0,0,rate); - leak=new EventList(EVL_Event,1.0,0,0,0,rate*double(samples_per_block)); // 1 per second + //leak=new EventList(EVL_Event,1.0,0,0,0,rate*double(samples_per_block)); // 1 per second pressure=new EventList(EVL_Event,0.01,0,0,0,rate*double(samples_per_block)); // 1 per second flow->setFirst(ti); - leak->setFirst(ti); + //leak->setFirst(ti); pressure->setFirst(ti); qint16 pr; @@ -453,10 +453,13 @@ bool FPIconLoader::OpenFLW(Machine * mach,QString filename, Profile * profile) // The Pressure and lkaj codes are before the end of block marker p-=3; - pr=p[0] << 8 | p[1]; + pr=p[1] << 8 | p[0]; lkaj=p[2]; int i=0; + pressure->AddEvent(ti,pr); + //leak->AddEvent(ti,lkaj); + do { tmp=buf[1] << 8 | buf[0]; val=(EventDataType(tmp)/100.0)-lkaj; @@ -480,7 +483,7 @@ bool FPIconLoader::OpenFLW(Machine * mach,QString filename, Profile * profile) sess->setLast(CPAP_FlowRate,ti); sess->setLast(CPAP_MaskPressure,ti); sess->eventlist[CPAP_FlowRate].push_back(flow); - sess->eventlist[CPAP_Leak].push_back(leak); + // sess->eventlist[CPAP_Leak].push_back(leak); sess->eventlist[CPAP_MaskPressure].push_back(pressure); } if (newsess)