From 1946be162c6da2a28d4abfcc54546d6e826644b9 Mon Sep 17 00:00:00 2001 From: sawinglogz <3787776-sawinglogz@users.noreply.gitlab.com> Date: Tue, 8 Oct 2019 11:20:51 -0400 Subject: [PATCH] Add support for 16-bit timestamps in F5V1 events. --- oscar/SleepLib/loader_plugins/prs1_loader.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/oscar/SleepLib/loader_plugins/prs1_loader.cpp b/oscar/SleepLib/loader_plugins/prs1_loader.cpp index fe6cfbe9..7cf89f58 100644 --- a/oscar/SleepLib/loader_plugins/prs1_loader.cpp +++ b/oscar/SleepLib/loader_plugins/prs1_loader.cpp @@ -2297,10 +2297,8 @@ bool PRS1DataChunk::ParseEventsF5V1(void) break; } startpos = pos; - if (code != 0 && code != 0x12) { // These two codes have no timestamp TODO: verify this applies to F5V012 - t += data[pos] /*| (data[pos+1] << 8)*/; // TODO: Is this really only 1 byte? - if (data[pos+1] != 0) qWarning() << this->sessionid << "nonzero time? byte" << hex(startpos); - CHECK_VALUE(data[pos+1], 0); + if (code != 0) { // Does this code really not have a timestamp? Never seen on F5V1, checked in F5V0. + t += data[pos] | (data[pos+1] << 8); pos += 2; }