From b0902c8f50f4d16f2d9af6c09216048f12f05d3f Mon Sep 17 00:00:00 2001 From: Collin Kidder Date: Wed, 11 May 2016 20:38:33 -0400 Subject: [PATCH] Fixed errors within last commit. Graphing works pretty well now with the new system. --- graphingwindow.cpp | 2 +- newgraphdialog.cpp | 2 ++ utility.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/graphingwindow.cpp b/graphingwindow.cpp index e5bbf64..3c45263 100644 --- a/graphingwindow.cpp +++ b/graphingwindow.cpp @@ -859,7 +859,7 @@ void GraphingWindow::createGraph(GraphParams ¶ms, bool createGraphParam) for (int j = 0; j < numEntries; j++) { - tempVal = Utility::processIntegerSignal(frameCache[j /** params.stride*/].data, sBit, bits, intelFormat, isSigned) & params.mask; + tempVal = Utility::processIntegerSignal(frameCache[j * params.stride].data, sBit, bits, intelFormat, isSigned); //& params.mask; //qDebug() << tempVal; if (secondsMode) { diff --git a/newgraphdialog.cpp b/newgraphdialog.cpp index 5f23f27..f92ee8b 100644 --- a/newgraphdialog.cpp +++ b/newgraphdialog.cpp @@ -78,6 +78,7 @@ void NewGraphDialog::setParams(GraphParams ¶ms) ui->txtScale->setText(QString::number(params.scale)); ui->txtStride->setText(QString::number(params.stride)); ui->cbSigned->setChecked(params.isSigned); + ui->cbIntel->setChecked(params.intelFormat); startBit = params.startBit; dataLen = params.numBits; @@ -99,6 +100,7 @@ void NewGraphDialog::getParams(GraphParams ¶ms) params.ID = Utility::ParseStringToNum(ui->txtID->text()); params.bias = ui->txtBias->text().toFloat(); params.isSigned = ui->cbSigned->isChecked(); + params.intelFormat = ui->cbIntel->isChecked(); params.mask = Utility::ParseStringToNum(ui->txtMask->text()); params.scale = ui->txtScale->text().toFloat(); params.stride = Utility::ParseStringToNum(ui->txtStride->text()); diff --git a/utility.h b/utility.h index 0479172..d5614e8 100644 --- a/utility.h +++ b/utility.h @@ -178,7 +178,7 @@ public: * actual signal. This extends the sign bits out so that the integer result reads as the proper negative * value. We dont need to do any of this if the sign bit wasn't set. */ - int64_t signedMask = ~((1ULL << sigSize) - 1); + uint64_t signedMask = ~((1ULL << sigSize) - 1); result = (-1LL & signedMask) | result; } }