CANDataGrid had the bits reversed. Whoops... This has been fixed. Added a + in the center of the flow view graph to show that the current data is actually there in the center not at the right edge like you might assume. Incremented version number.
This commit is contained in:
+2
-2
@@ -82,8 +82,8 @@ void CANDataGrid::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
thisBit = false;
|
||||
prevBit = false;
|
||||
if ((thisByte & (1 << x)) == (1 << x)) thisBit = true;
|
||||
if ((prevByte & (1 << x)) == (1 << x)) prevBit = true;
|
||||
if ((thisByte & (1 << (7-x))) == (1 << (7-x))) thisBit = true;
|
||||
if ((prevByte & (1 << (7-x))) == (1 << (7-x))) prevBit = true;
|
||||
|
||||
if (thisBit)
|
||||
{
|
||||
|
||||
+12
-4
@@ -1,8 +1,8 @@
|
||||
#include "flowviewwindow.h"
|
||||
#include "ui_flowviewwindow.h"
|
||||
|
||||
const QColor FlowViewWindow::graphColors[8] = {Qt::blue, Qt::green, Qt::black, Qt::red,
|
||||
Qt::gray, Qt::yellow, Qt::cyan, Qt::darkMagenta};
|
||||
const QColor FlowViewWindow::graphColors[8] = {Qt::blue, Qt::green, Qt::black, Qt::red, //0 1 2 3
|
||||
Qt::gray, Qt::yellow, Qt::cyan, Qt::darkMagenta}; //4 5 6 7
|
||||
|
||||
|
||||
FlowViewWindow::FlowViewWindow(QVector<CANFrame> *frames, QWidget *parent) :
|
||||
@@ -25,12 +25,20 @@ FlowViewWindow::FlowViewWindow(QVector<CANFrame> *frames, QWidget *parent) :
|
||||
//ui->graphView->setInteractions();
|
||||
|
||||
ui->graphView->xAxis->setRange(0, 8);
|
||||
ui->graphView->yAxis->setRange(0, 255);
|
||||
ui->graphView->yAxis->setRange(-10, 265); //run range a bit outside possible number so they aren't plotted in a hard to see place
|
||||
ui->graphView->axisRect()->setupFullAxesBox();
|
||||
|
||||
QCPItemText *textLabel = new QCPItemText(ui->graphView);
|
||||
ui->graphView->addItem(textLabel);
|
||||
textLabel->setPositionAlignment(Qt::AlignTop|Qt::AlignHCenter);
|
||||
textLabel->position->setType(QCPItemPosition::ptAxisRectRatio);
|
||||
textLabel->position->setCoords(0.5, .5);
|
||||
textLabel->setText("+");
|
||||
textLabel->setFont(QFont(font().family(), 16)); // make font a bit larger
|
||||
textLabel->setPen(QPen(Qt::black)); // show black border around text
|
||||
|
||||
ui->graphView->xAxis->setLabel("Time Axis");
|
||||
ui->graphView->yAxis->setLabel("Value Axis");
|
||||
//ui->graphView->legend->setVisible(true);
|
||||
QFont legendFont = font();
|
||||
legendFont.setPointSize(10);
|
||||
QFont legendSelectedFont = font();
|
||||
|
||||
@@ -782,6 +782,69 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Data Byte Colors:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="text">
|
||||
<string>0 = Blue</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_22">
|
||||
<property name="text">
|
||||
<string>1 = Green</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_23">
|
||||
<property name="text">
|
||||
<string>2 = Black</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_24">
|
||||
<property name="text">
|
||||
<string>3 = Red</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_25">
|
||||
<property name="text">
|
||||
<string>4 = Gray</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_26">
|
||||
<property name="text">
|
||||
<string>5 = Yellow</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_27">
|
||||
<property name="text">
|
||||
<string>6 = Cyan</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_28">
|
||||
<property name="text">
|
||||
<string>7 = Dark Magenta</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
#include "framesenderwindow.h"
|
||||
#include "dbchandler.h"
|
||||
|
||||
#define VERSION 103
|
||||
#define VERSION 104
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
|
||||
Reference in New Issue
Block a user