From 69faf5cf97d71e24a30bcb736ac51fc2c91dbf54 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sun, 28 Feb 2016 11:59:41 +1000 Subject: [PATCH] Philips PB/CSR flag length on older machines don't look like they double --- sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp b/sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp index e5c8594c..d73a4251 100644 --- a/sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp +++ b/sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp @@ -1308,7 +1308,11 @@ bool PRS1Import::ParseF0Events() break; case 0x0f: // Cheyne Stokes Respiration - data[0] = (buffer[pos + 1] << 8 | buffer[pos]) * 2; + data[0] = (buffer[pos + 1] << 8 | buffer[pos]); + if (event->familyVersion > 4) { + // might not doublerize on older machines + data[0] *= 2; + } pos += 2; data[1] = buffer[pos++]; tt = t - qint64(data[1]) * 1000L;