From 569b94abf890bc7ffa01d892a1b874a122e123e1 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Wed, 20 Aug 2014 13:29:22 +1000 Subject: [PATCH] More cms50 tests.. --- sleepyhead/SleepLib/loader_plugins/cms50f37_loader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sleepyhead/SleepLib/loader_plugins/cms50f37_loader.cpp b/sleepyhead/SleepLib/loader_plugins/cms50f37_loader.cpp index c4cd61a9..2d614217 100644 --- a/sleepyhead/SleepLib/loader_plugins/cms50f37_loader.cpp +++ b/sleepyhead/SleepLib/loader_plugins/cms50f37_loader.cpp @@ -325,7 +325,7 @@ void CMS50F37Loader::processBytes(QByteArray bytes) buffer[idx+i] = buffer[idx+i] ^ 0x80; } - switch(res) { + if (!started_reading) switch(res) { case 0x02: data = buffer.at(idx+1); if (data == 0) { @@ -375,7 +375,7 @@ void CMS50F37Loader::processBytes(QByteArray bytes) // duration duration = buffer.at(idx+4) | (buffer.at(idx+5) << 8) - | (buffer.at(idx+6) << 16) | (buffer.at(idx+7) << 24); + | (buffer.at(idx+6) << 16); break; // COMMAND_GET_SESSION_COUNT