Fix some bugs related to graphing and loading graph definitions
This commit is contained in:
@@ -81,7 +81,7 @@ GraphingWindow::GraphingWindow(const QVector<CANFrame> *frames, QWidget *parent)
|
||||
selectedPen.setWidth(1);
|
||||
selectedPen.setColor(Qt::blue);
|
||||
|
||||
ui->graphingView->setAttribute(Qt::WA_AcceptTouchEvents);
|
||||
//ui->graphingView->setAttribute(Qt::WA_AcceptTouchEvents);
|
||||
|
||||
if (useOpenGL)
|
||||
{
|
||||
|
||||
+13
-2
@@ -93,8 +93,8 @@ void NewGraphDialog::checkSignalAgreement()
|
||||
GraphParams testingParams;
|
||||
bool bAgree = true;
|
||||
bool sigSigned = false;
|
||||
DBC_SIGNAL *sig;
|
||||
DBC_MESSAGE *msg;
|
||||
DBC_SIGNAL *sig = nullptr;
|
||||
DBC_MESSAGE *msg = nullptr;
|
||||
|
||||
if (dbcHandler == nullptr) return;
|
||||
if (dbcHandler->getFileCount() == 0) return;
|
||||
@@ -104,6 +104,11 @@ void NewGraphDialog::checkSignalAgreement()
|
||||
{
|
||||
sig = msg->sigHandler->findSignalByName(ui->cbSignals->currentText());
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->lblMsgStatus->setText("Msg ID doesn't exist in DBC");
|
||||
return;
|
||||
}
|
||||
|
||||
if (sig)
|
||||
{
|
||||
@@ -125,6 +130,12 @@ void NewGraphDialog::checkSignalAgreement()
|
||||
if (testingParams.startBit != sig->startBit) bAgree = false;
|
||||
if (testingParams.numBits != sig->signalSize) bAgree = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->lblMsgStatus->setText("Signal name doesn't exist in DBC");
|
||||
return;
|
||||
}
|
||||
|
||||
if (bAgree)
|
||||
{
|
||||
ui->lblMsgStatus->setText("Graph params match this signal");
|
||||
|
||||
Reference in New Issue
Block a user