From 231d5ae3bfce7981a5d40bd675f0975f921ce74d Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sun, 10 Jun 2018 18:14:28 +1000 Subject: [PATCH] Don't grab DV64 pressure from L.BIN if already present in R.BIN --- .../SleepLib/loader_plugins/intellipap_loader.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sleepyhead/SleepLib/loader_plugins/intellipap_loader.cpp b/sleepyhead/SleepLib/loader_plugins/intellipap_loader.cpp index 7a7a20ce..56aba75b 100644 --- a/sleepyhead/SleepLib/loader_plugins/intellipap_loader.cpp +++ b/sleepyhead/SleepLib/loader_plugins/intellipap_loader.cpp @@ -883,7 +883,7 @@ int IntellipapLoader::OpenDV6(const QString & path) qint64 LLstart =0, LLend = 0; SR = summaryList.begin(); - for (int r=0; rsess->AddEventList(CPAP_RespRate, EVL_Event); MV = R->sess->AddEventList(CPAP_MinuteVent, EVL_Event); TV = R->sess->AddEventList(CPAP_TidalVolume, EVL_Event); - Pressure = R->sess->AddEventList(CPAP_Pressure, EVL_Event); + + if (!R->sess->channelDataExists(CPAP_Pressure)) { + // Don't use this pressure if we have higher resolution available + Pressure = R->sess->AddEventList(CPAP_Pressure, EVL_Event); + } } if (leak) { sess = R->sess; @@ -1351,7 +1355,8 @@ int IntellipapLoader::OpenDV6(const QString & path) maxleak->AddEvent(ti, data[5]); leak->AddEvent(ti, data[6]); RR->AddEvent(ti, data[9]); - Pressure->AddEvent(ti, data[11] / 10.0f); + + if (Pressure) Pressure->AddEvent(ti, data[11] / 10.0f); unsigned tv = data[7] | data[8] << 8; MV->AddEvent(ti, data[10] );