Fixed several problems with Sniffer window. Incremented version number
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#ifndef CONFIG
|
||||
#define CONFIG
|
||||
|
||||
#define VERSION 199
|
||||
#define VERSION 200
|
||||
|
||||
//try to keep this in sync.
|
||||
//SavvyCAN will complain if you connect a GVRET board with a revision
|
||||
|
||||
@@ -116,7 +116,7 @@ void SnifferDelegate::paint(QPainter *painter, const QStyleOptionViewItem &optio
|
||||
painter->setOpacity(1.0);
|
||||
painter->setPen(QApplication::palette().color(QPalette::Text));
|
||||
painter->setFont(mainFont);
|
||||
painter->drawText(QRect(viewport.left(), viewport.top() + xSector + yOffset, xSpan, mainFontInfo->pixelSize()), Qt::AlignCenter, Utility::formatNumber((char)val));
|
||||
painter->drawText(QRect(viewport.left(), viewport.top() + xSector + yOffset, xSpan, mainFontInfo->pixelSize()), Qt::AlignCenter, Utility::formatNumber((unsigned char)val));
|
||||
}
|
||||
|
||||
QSize SnifferDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
|
||||
@@ -9,7 +9,7 @@ SnifferItem::SnifferItem(const CANFrame& pFrame, quint32 seq):
|
||||
const unsigned char *data = reinterpret_cast<const unsigned char *>(pFrame.payload().constData());
|
||||
int dataLen = pFrame.payload().length();
|
||||
|
||||
for (int i = 0; i < 0; i++) {
|
||||
for (int i = 0; i < dataLen; i++) {
|
||||
mNotch[i] = 0;
|
||||
mMarker.data[i] = 0;
|
||||
mMarker.dataTimestamp[i] = 0;
|
||||
|
||||
@@ -70,7 +70,7 @@ QVariant SnifferModel::data(const QModelIndex &index, int role) const
|
||||
int data = item->getData(col-tc::DATA_0);
|
||||
if(data >= 0)
|
||||
{
|
||||
return QString("%1").arg(data, 2, 16, QLatin1Char('0')).toUpper();
|
||||
return QString("%1").arg((uint8_t)data, 2, 16, QLatin1Char('0')).toUpper();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user