From 678bff9702aa58b6b66ebd6112690d6bd0beba8b Mon Sep 17 00:00:00 2001 From: Phil Olynyk Date: Sat, 12 Nov 2022 14:46:57 -0500 Subject: [PATCH] Add new channels to dot001 in saveSessions --- oscar/SleepLib/loader_plugins/resmed_EDFinfo.h | 6 +++--- oscar/SleepLib/loader_plugins/resmed_loader.cpp | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/oscar/SleepLib/loader_plugins/resmed_EDFinfo.h b/oscar/SleepLib/loader_plugins/resmed_EDFinfo.h index 9d52a795..0c1d7cd2 100644 --- a/oscar/SleepLib/loader_plugins/resmed_EDFinfo.h +++ b/oscar/SleepLib/loader_plugins/resmed_EDFinfo.h @@ -242,11 +242,11 @@ public: int s_EasyBreathe; int s_RiseEnable; - int s_RiseTime; + EventDataType s_RiseTime; int s_Cycle; int s_Trigger; - int s_TiMax; - int s_TiMin; + EventDataType s_TiMax; + EventDataType s_TiMin; }; diff --git a/oscar/SleepLib/loader_plugins/resmed_loader.cpp b/oscar/SleepLib/loader_plugins/resmed_loader.cpp index fa93fb85..e498c644 100644 --- a/oscar/SleepLib/loader_plugins/resmed_loader.cpp +++ b/oscar/SleepLib/loader_plugins/resmed_loader.cpp @@ -1904,7 +1904,7 @@ bool ResmedLoader::ProcessSTRfiles(Machine *mach, QMap & STRmap, } } if (R.rms9_mode == 6) { // vAuto mode - qDebug() << vAuto mode found" << 6; + qDebug() << "vAuto mode found" << 6; if ((sig = str.lookupLabel("S.Cycle"))) { R.s_Cycle = EventDataType(sig->dataArray[rec]) * sig->gain + sig->offset; qDebug() << "Cycle" << R.s_Cycle; @@ -1915,9 +1915,11 @@ bool ResmedLoader::ProcessSTRfiles(Machine *mach, QMap & STRmap, } if ((sig = str.lookupLabel("S.TiMax"))) { R.s_TiMax = EventDataType(sig->dataArray[rec]) * sig->gain + sig->offset; + qDebug() << QString("TiMax %1").arg( R.s_TiMax, 0, 'f', 1); } if ((sig = str.lookupLabel("S.TiMin"))) { R.s_TiMin = EventDataType(sig->dataArray[rec]) * sig->gain + sig->offset; + qDebug() << QString("TiMin %1").arg( R.s_TiMin, 0, 'f', 1); } } if ( R.min_pressure == 0 ) { @@ -2406,6 +2408,10 @@ void StoreSettings(Session * sess, STRRecord & R) if (R.min_epap >= 0) sess->settings[CPAP_EPAPLo] = R.min_epap; if (R.max_ipap >= 0) sess->settings[CPAP_IPAPHi] = R.max_ipap; if (R.ps >= 0) sess->settings[CPAP_PS] = R.ps; + if (R.s_Cycle >= 0) sess->settings[ RMAS1x_Cycle ] = R.s_Cycle; + if (R.s_Trigger >= 0) sess->settings[ RMAS1x_Trigger ] = R.s_Trigger; + if (R.s_TiMax >= 0) sess->settings[ RMAS1x_TiMax ] = R.s_TiMax; + if (R.s_TiMin >= 0) sess->settings[ RMAS1x_TiMin ] = R.s_TiMin; } else if (R.mode == MODE_ASV) { if (R.epap >= 0) sess->settings[CPAP_EPAP] = R.epap; if (R.min_ps >= 0) sess->settings[CPAP_PSMin] = R.min_ps;