CMS50i PI test6

This commit is contained in:
Mark Watkins 2014-08-22 02:53:07 +10:00
parent d8bf63f613
commit b88e9351dc
2 changed files with 2 additions and 2 deletions

View File

@ -600,7 +600,7 @@ void SummaryChart::paint(QPainter &painter, gGraph &w, const QRegion &region)
if (d != m_values.end()) {
day = m_days[zd];
bool summary_only = day->summaryOnly();
bool summary_only = day && day->summaryOnly();
if (!m_hours.contains(zd)) {

View File

@ -460,7 +460,7 @@ void CMS50F37Loader::processBytes(QByteArray bytes)
quint8 msb = buf[1];
for (int i = 2; i < len-1; i++, msb >>= 1) {
buf[i] = (buf[i] & 0x7f) | (msb & 0x01) ? 0x80 : 0;
buf[i] = (buf[i] & 0x7f) | ((msb & 0x01) ? 0x80 : 0);
}
quint16 pi = buf[4] | buf[5] << 8;