From 8740ddf923053a933527e2cdbffb43494d02f9a6 Mon Sep 17 00:00:00 2001 From: sawinglogz <3787776-sawinglogz@users.noreply.gitlab.com> Date: Sun, 1 Dec 2019 18:21:18 -0500 Subject: [PATCH] Add pressure pulse event observed on F5V1. --- oscar/SleepLib/loader_plugins/prs1_loader.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/oscar/SleepLib/loader_plugins/prs1_loader.cpp b/oscar/SleepLib/loader_plugins/prs1_loader.cpp index 3800cb46..f4159b2c 100644 --- a/oscar/SleepLib/loader_plugins/prs1_loader.cpp +++ b/oscar/SleepLib/loader_plugins/prs1_loader.cpp @@ -2055,7 +2055,7 @@ bool PRS1DataChunk::ParseEventsF5V0(void) case 0x02: // Pressure adjustment this->AddEvent(new PRS1EPAPSetEvent(t, data[pos++])); break; - //case 0x03: // never seen on F5V0 + //case 0x03: // never seen on F5V0; probably pressure pulse, see F5V1 case 0x04: // Timed Breath // TB events have a duration in 0.1s, based on the review of pressure waveforms. // TODO: Ideally the starting time here would be adjusted here, but PRS1ParsedEvents @@ -2156,6 +2156,7 @@ bool PRS1DataChunk::ParseEventsF5V0(void) static const QVector ParsedEventsF5V1 = { PRS1EPAPSetEvent::TYPE, + PRS1PressurePulseEvent::TYPE, PRS1TimedBreathEvent::TYPE, PRS1ObstructiveApneaEvent::TYPE, PRS1ClearAirwayEvent::TYPE, @@ -2186,7 +2187,7 @@ bool PRS1DataChunk::ParseEventsF5V1(void) } const unsigned char * data = (unsigned char *)this->m_data.constData(); int chunk_size = this->m_data.size(); - static const QMap event_sizes = { {1,2}, {3,4}, {8,4}, {9,3}, {0xa,2}, {0xb,5}, {0xc,5}, {0xd,0xd} }; + static const QMap event_sizes = { {1,2}, {8,4}, {9,3}, {0xa,2}, {0xb,5}, {0xc,5}, {0xd,0xd} }; if (chunk_size < 1) { // This does occasionally happen in F0V6. @@ -2223,7 +2224,10 @@ bool PRS1DataChunk::ParseEventsF5V1(void) case 0x02: // Pressure adjustment this->AddEvent(new PRS1EPAPSetEvent(t, data[pos++])); break; - //case 0x03: // never seen on F5V1 + case 0x03: // Pressure Pulse + duration = data[pos]; // TODO: is this a duration? + this->AddEvent(new PRS1PressurePulseEvent(t, duration)); + break; case 0x04: // Timed Breath // TB events have a duration in 0.1s, based on the review of pressure waveforms. // TODO: Ideally the starting time here would be adjusted here, but PRS1ParsedEvents