From 11b1d9a0458d9daf5eef2f73cc83ac2888c598e1 Mon Sep 17 00:00:00 2001 From: Phil Olynyk Date: Fri, 21 Feb 2020 21:41:00 -0500 Subject: [PATCH] Roll the VAuto TrigCycEvent into the S0 VPAP-S RespEvent type --- oscar/SleepLib/loader_plugins/resmed_loader.cpp | 8 +++++++- oscar/SleepLib/schema.cpp | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/oscar/SleepLib/loader_plugins/resmed_loader.cpp b/oscar/SleepLib/loader_plugins/resmed_loader.cpp index b82b04fb..52dad00d 100644 --- a/oscar/SleepLib/loader_plugins/resmed_loader.cpp +++ b/oscar/SleepLib/loader_plugins/resmed_loader.cpp @@ -2453,6 +2453,10 @@ bool ResmedLoader::LoadBRP(Session *sess, const QString & path) } else if (matchSignal(CPAP_RespEvent, es.label)) { code = CPAP_RespEvent; +// } else if (es.label == "TrigCycEvt.40ms") { // we need a real code for this signal +// code = CPAP_TriggerEvent; // Well, it got folded into RespEvent +// continue; + } else if (es.label != "Crc16") { qDebug() << "Unobserved ResMed BRP Signal " << es.label; continue; @@ -2914,10 +2918,12 @@ void setupResMedTranslationMap() // BRP file resmed_codes[CPAP_FlowRate] = QStringList{ "Flow", "Flow.40ms" }; resmed_codes[CPAP_MaskPressureHi] = QStringList{ "Mask Pres", "Press.40ms" }; +// resmed_codes[CPAP_TriggerEvent] = QStringList{ "TrigCycEvt.40ms" }; // AC10 VAuto and -S + resmed_codes[CPAP_RespEvent] = QStringList {"Resp Event", "TrigCycEvt.40ms" }; // S9 VPAPS and STA-IVAPS call it RespEvent // PLD File resmed_codes[CPAP_MaskPressure] = QStringList { "Mask Pres", "MaskPress.2s" }; - resmed_codes[CPAP_RespEvent] = QStringList {"Resp Event" }; +// resmed_codes[CPAP_RespEvent] = QStringList {"Resp Event" }; resmed_codes[CPAP_Pressure] = QStringList { "Therapy Pres", "Press.2s" }; // Un problemo... IPAP also uses Press.2s.. check the mode :/ resmed_codes[CPAP_IPAP] = QStringList { "Insp Pres", "IPAP", "S.BL.IPAP" }; resmed_codes[CPAP_EPAP] = QStringList { "Exp Pres", "EprPress.2s", "EPAP", "S.BL.EPAP", "EPRPress.2s" }; diff --git a/oscar/SleepLib/schema.cpp b/oscar/SleepLib/schema.cpp index 4ef805a2..e31cc165 100644 --- a/oscar/SleepLib/schema.cpp +++ b/oscar/SleepLib/schema.cpp @@ -215,7 +215,7 @@ void init() QObject::tr("Mask Pressure"), QObject::tr("Mask Pressure"), QObject::tr("Mask Pressure"), STR_UNIT_CMH2O, DEFAULT, QColor("blue"))); schema::channel.add(GRP_CPAP, new Channel(CPAP_MaskPressureHi = 0x1102, WAVEFORM, MT_CPAP, SESSION, "MaskPressureHi", - QObject::tr("Mask Pressure"), QObject::tr("Mask Pressure (High resolution)"), QObject::tr("Mask Pressure"), STR_UNIT_CMH2O, DEFAULT, QColor("blue"), 0x1101)); // linked to CPAP_MaskPressure + QObject::tr("Mask Pressure"), QObject::tr("Mask Pressure (High frequency)"), QObject::tr("Mask Pressure"), STR_UNIT_CMH2O, DEFAULT, QColor("blue"), 0x1101)); // linked to CPAP_MaskPressure schema::channel.add(GRP_CPAP, new Channel(CPAP_TidalVolume = 0x1103, WAVEFORM, MT_CPAP, SESSION, STR_GRAPH_TidalVolume, QObject::tr("Tidal Volume"), QObject::tr("Amount of air displaced per breath"), QObject::tr("Tidal Volume"), STR_UNIT_ml, DEFAULT, QColor("magenta"))); @@ -245,8 +245,8 @@ void init() schema::channel.add(GRP_CPAP, new Channel(CPAP_Ti = 0x110B, WAVEFORM, MT_CPAP, SESSION, STR_GRAPH_Ti, QObject::tr("Inspiratory Time"), QObject::tr("Time taken to breathe in"), QObject::tr("Insp. Time"), STR_UNIT_Seconds, DEFAULT, QColor("dark blue"))); - schema::channel.add(GRP_CPAP, new Channel(CPAP_RespEvent = 0x1112, DATA, MT_CPAP, SESSION, STR_GRAPH_RespEvent, - QObject::tr("Respiratory Event"), QObject::tr("A ResMed data source showing Respiratory Events"), QObject::tr("Resp. Event"), STR_UNIT_EventsPerHour, DEFAULT, QColor("black"))); + schema::channel.add(GRP_CPAP, new Channel(CPAP_RespEvent = 0x1112, WAVEFORM, MT_CPAP, SESSION, STR_GRAPH_RespEvent, + QObject::tr("Respiratory Event"), QObject::tr("A ResMed data item: Trigger Cycle Event"), QObject::tr("Resp. Event"), STR_UNIT_CMH2O, DEFAULT, QColor("black"))); schema::channel.add(GRP_CPAP, new Channel(CPAP_FLG = 0x1113, WAVEFORM, MT_CPAP, SESSION, STR_GRAPH_FlowLimitation, QObject::tr("Flow Limitation"), QObject::tr("Graph showing severity of flow limitations"), QObject::tr("Flow Limit."), STR_UNIT_Severity, DEFAULT, QColor("#585858")));