diff --git a/sleepyhead/Graphs/gGraphView.cpp b/sleepyhead/Graphs/gGraphView.cpp index d3c5e772..a3fa4a1c 100644 --- a/sleepyhead/Graphs/gGraphView.cpp +++ b/sleepyhead/Graphs/gGraphView.cpp @@ -1236,7 +1236,7 @@ void gGraphView::paintGL() graphs_drawn = renderGraphs(painter); if (!graphs_drawn) { // No graphs drawn? show something useful :) - QString txt = QObject::tr("SleepyHead is proudly brought to you by JediMark.").arg(VersionString); + QString txt = QObject::tr("SleepyHead is proudly brought to you by JediMark."); // int x2, y2; // GetTextExtent(m_emptytext, x2, y2, bigfont); diff --git a/sleepyhead/Graphs/gLineChart.cpp b/sleepyhead/Graphs/gLineChart.cpp index 3af368bd..baa6d5ed 100644 --- a/sleepyhead/Graphs/gLineChart.cpp +++ b/sleepyhead/Graphs/gLineChart.cpp @@ -789,12 +789,12 @@ void gLineChart::paint(QPainter &painter, gGraph &w, const QRegion ®ion) data = (*ptr + el.offset()) * gain; lastpx = xst + ((time - minx) * xmult); lastpy = yst - ((data - miny) * ymult); - EventStoreType *eptr = ptr + el.count()-1; + EventStoreType *eptr = el.rawData() + el.count()-1; siz--; for (int i = idx; i < siz; i += sam) { ptr += sam; - if (ptr > eptr) break; + if (ptr >= eptr) break; time += rate; data = (*ptr + el.offset()) * gain; diff --git a/sleepyhead/SleepLib/loader_plugins/cms50f37_loader.cpp b/sleepyhead/SleepLib/loader_plugins/cms50f37_loader.cpp index a976d378..cd0ccb2f 100644 --- a/sleepyhead/SleepLib/loader_plugins/cms50f37_loader.cpp +++ b/sleepyhead/SleepLib/loader_plugins/cms50f37_loader.cpp @@ -460,14 +460,12 @@ void CMS50F37Loader::processBytes(QByteArray bytes) buf[i] = (buf[i] & 0x7f) | (msb & 0x01 ? 0x80 : 0); } - //qint16 pi = buffer.data()[idx+4] | buffer.data()[idx+5] << 8; - qint16 pi = ((char *)buf)[idx+5] << 8 | buf[idx+4]; - + quint16 pi = buffer.at(idx + 4) | (buffer.at(idx + 5) << 8); pulse = buf[3]; quint8 spo2 = buf[2]; - oxirec->append(((spo2 == 0) || (pulse == 0) || (pi>=0)) ? OxiRecord(0,0,0) : OxiRecord(pulse, spo2, pi)); + oxirec->append(((spo2 == 0) || (pulse == 0)) ? OxiRecord(0,0,0) : OxiRecord(pulse, spo2, pi)); } else if (res == 0x0f) { // f,80,de,c2,de,c2,de,c2 cms50F data... diff --git a/sleepyhead/SleepLib/serialoximeter.h b/sleepyhead/SleepLib/serialoximeter.h index d7172ffe..3b533e8e 100644 --- a/sleepyhead/SleepLib/serialoximeter.h +++ b/sleepyhead/SleepLib/serialoximeter.h @@ -21,7 +21,7 @@ struct OxiRecord { quint8 pulse; quint8 spo2; - qint16 perf; + quint16 perf; OxiRecord():pulse(0), spo2(0),perf(0) {} OxiRecord(quint8 p, quint8 s): pulse(p), spo2(s) {} diff --git a/sleepyhead/icons/sdcard.png b/sleepyhead/icons/sdcard.png index 59f2ddb6..bc99f119 100644 Binary files a/sleepyhead/icons/sdcard.png and b/sleepyhead/icons/sdcard.png differ