Many little fixes to clean up warnings and bugs.
This commit is contained in:
@@ -267,6 +267,8 @@ void DiscreteStateWindow::handleTick()
|
||||
{
|
||||
case DWStates::IDLE:
|
||||
break;
|
||||
case DWStates::DONE:
|
||||
break;
|
||||
case DWStates::COUNTDOWN_SIGNAL:
|
||||
ticksUntilStateChange--;
|
||||
if (ticksUntilStateChange == 0)
|
||||
@@ -334,7 +336,7 @@ void DiscreteStateWindow::calculateResults()
|
||||
frameCache.clear();
|
||||
for (int i = 0; i < modelFrames->count(); i++)
|
||||
{
|
||||
if (modelFrames->at(i).ID == it.key()) frameCache.append(modelFrames->at(i));
|
||||
if (modelFrames->at(i).ID == (unsigned int)it.key()) frameCache.append(modelFrames->at(i));
|
||||
}
|
||||
for (int bits = maxBits; bits >= minBits; bits--)
|
||||
{
|
||||
|
||||
@@ -154,7 +154,7 @@ void FileComparatorWindow::calculateDetails()
|
||||
CANFrame frame = referenceFrames.at(x);
|
||||
if (referenceIDs.contains(frame.ID)) //if we saw this ID before then add to the QList in there
|
||||
{
|
||||
for (int y = 0; y < frame.len; y++)
|
||||
for (unsigned int y = 0; y < frame.len; y++)
|
||||
{
|
||||
referenceIDs[frame.ID].values[y][frame.data[y]]++;
|
||||
tmp = frame.data[y];
|
||||
|
||||
@@ -371,7 +371,7 @@ void FlowViewWindow::updatedFrames(int numFrames)
|
||||
else //just got some new frames. See if they are relevant.
|
||||
{
|
||||
if (numFrames > modelFrames->count()) return;
|
||||
int refID;
|
||||
unsigned int refID;
|
||||
if (frameCache.count() > 0) refID = frameCache[0].ID;
|
||||
else refID = 0;
|
||||
bool needRefresh = false;
|
||||
@@ -510,7 +510,7 @@ void FlowViewWindow::updateFrameLabel()
|
||||
void FlowViewWindow::changeID(QString newID)
|
||||
{
|
||||
//parse the ID and then load up the frame cache with just messages with that ID.
|
||||
int id = Utility::ParseStringToNum(newID);
|
||||
uint32_t id = (uint32_t)Utility::ParseStringToNum(newID);
|
||||
frameCache.clear();
|
||||
|
||||
if (modelFrames->count() == 0) return;
|
||||
@@ -531,7 +531,7 @@ void FlowViewWindow::changeID(QString newID)
|
||||
if (frameCache.count() == 0) return;
|
||||
|
||||
removeAllGraphs();
|
||||
for (int c = 0; c < frameCache.at(0).len; c++)
|
||||
for (uint32_t c = 0; c < frameCache.at(0).len; c++)
|
||||
{
|
||||
createGraph(c);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ void FrameInfoWindow::updatedFrames(int numFrames)
|
||||
else //just got some new frames. See if they are relevant.
|
||||
{
|
||||
if (numFrames > modelFrames->count()) return;
|
||||
int currID = 0;
|
||||
unsigned int currID = 0;
|
||||
if (ui->listFrameID->currentItem())
|
||||
currID = ui->listFrameID->currentItem()->text().toInt(NULL, 16);
|
||||
bool foundID = false;
|
||||
@@ -140,7 +140,7 @@ void FrameInfoWindow::updateDetailsWindow(QString newID)
|
||||
for (int i = 0; i < modelFrames->count(); i++)
|
||||
{
|
||||
CANFrame thisFrame = modelFrames->at(i);
|
||||
if (thisFrame.ID == targettedID) frameCache.append(thisFrame);
|
||||
if (thisFrame.ID == (unsigned int)targettedID) frameCache.append(thisFrame);
|
||||
}
|
||||
|
||||
ui->treeDetails->clear();
|
||||
|
||||
@@ -50,7 +50,6 @@ FuzzingWindow::~FuzzingWindow()
|
||||
|
||||
void FuzzingWindow::updatedFrames(int numFrames)
|
||||
{
|
||||
CANFrame thisFrame;
|
||||
int id;
|
||||
if (numFrames == -1) //all frames deleted. Kill the display
|
||||
{
|
||||
@@ -257,7 +256,7 @@ void FuzzingWindow::calcNextBitPattern()
|
||||
for (int bit = 0; bit < 8; bit++)
|
||||
{
|
||||
thisBit = bitGrid[byt * 8 + bit];
|
||||
if (thisBit == 1 && (byt * 8 + bit) == bitAccum)
|
||||
if ( (thisBit == 1) && (unsigned int)(byt * 8 + bit) == bitAccum)
|
||||
{
|
||||
currentBytes[byt] |= (1 << bit);
|
||||
}
|
||||
|
||||
@@ -178,6 +178,7 @@ void GraphingWindow::plottableDoubleClick(QCPAbstractPlottable* plottable, QMous
|
||||
|
||||
void GraphingWindow::gotCenterTimeID(int32_t ID, double timestamp)
|
||||
{
|
||||
Q_UNUSED(ID)
|
||||
//its problematic to try to highlight a graph since we get the ID
|
||||
//and timestamp not the signal in question so there is no real way
|
||||
//to know which graph. But, if that changes here is a stub
|
||||
@@ -195,8 +196,8 @@ void GraphingWindow::gotCenterTimeID(int32_t ID, double timestamp)
|
||||
void GraphingWindow::titleDoubleClick(QMouseEvent* event, QCPPlotTitle* title)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
Q_UNUSED(title)
|
||||
// Set the plot title by double clicking on it
|
||||
bool ok;
|
||||
|
||||
/*
|
||||
QString newTitle = QInputDialog::getText(this, "SavvyCAN Graphing", "New plot title:", QLineEdit::Normal, title->text(), &ok);
|
||||
@@ -354,6 +355,8 @@ bool GraphingWindow::eventFilter(QObject *obj, QEvent *event)
|
||||
// standard event processing
|
||||
return QObject::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void GraphingWindow::resetView()
|
||||
|
||||
@@ -151,7 +151,7 @@ void ISOTP_HANDLER::processFrame(const CANFrame &frame)
|
||||
int frameType;
|
||||
int frameLen;
|
||||
int ln;
|
||||
int offset;
|
||||
//int offset;
|
||||
ISOTP_MESSAGE msg;
|
||||
ISOTP_MESSAGE *pMsg;
|
||||
|
||||
@@ -230,7 +230,7 @@ void ISOTP_HANDLER::processFrame(const CANFrame &frame)
|
||||
}
|
||||
if (!pMsg) return;
|
||||
ln = pMsg->len - pMsg->data.count();
|
||||
offset = pMsg->data.count();
|
||||
//offset = pMsg->data.count();
|
||||
if (useExtendedAddressing)
|
||||
{
|
||||
if (ln > 6) ln = 6;
|
||||
|
||||
@@ -145,7 +145,6 @@ void NewGraphDialog::loadSignals(int idx)
|
||||
void NewGraphDialog::bitfieldClicked(int x,int y)
|
||||
{
|
||||
int bit = (y * 8 + (7-x));
|
||||
int res;
|
||||
|
||||
qDebug() << "Clicked bit: " << bit;
|
||||
startBit = bit;
|
||||
|
||||
@@ -171,7 +171,7 @@ void RangeStateWindow::refreshFilterList()
|
||||
void RangeStateWindow::recalcButton()
|
||||
{
|
||||
QHash<int, bool>::iterator iter;
|
||||
int id;
|
||||
uint32_t id;
|
||||
|
||||
ui->listCandidates->clear();
|
||||
foundSignals.clear();
|
||||
@@ -376,7 +376,7 @@ void RangeStateWindow::createGraph(QVector<int> values)
|
||||
else ymin *= 0.8;
|
||||
|
||||
ymax = maxval;
|
||||
if (ymax < 0) ymax * 0.8;
|
||||
if (ymax < 0) ymax *= 0.8;
|
||||
else ymax *= 1.2;
|
||||
|
||||
if (fabs(ymin) < 0.01) ymin -= (ymax / 60.0);
|
||||
@@ -401,7 +401,7 @@ void RangeStateWindow::clickedSignalList(int idx)
|
||||
{
|
||||
if (idx == -1) return; //just in case...
|
||||
|
||||
int id, startBit, bitLength;
|
||||
uint32_t id, startBit, bitLength;
|
||||
bool isSigned = false, isBigEndian = false;
|
||||
int64_t valu;
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ void UDSScanWindow::rapidFrames(int numFrames)
|
||||
{
|
||||
CANFrame thisFrame;
|
||||
QString result;
|
||||
int id;
|
||||
uint32_t id;
|
||||
int offset = ui->spinReplyOffset->value();
|
||||
CANFrame sentFrame;
|
||||
bool gotReply = false;
|
||||
@@ -157,7 +157,7 @@ void UDSScanWindow::rapidFrames(int numFrames)
|
||||
thisFrame = modelFrames->at(i);
|
||||
id = thisFrame.ID;
|
||||
|
||||
if ((id == (sentFrame.ID + offset)) || ui->cbAllowAdaptiveOffset->isChecked())
|
||||
if ((id == (uint32_t)(sentFrame.ID + offset)) || ui->cbAllowAdaptiveOffset->isChecked())
|
||||
{
|
||||
int temp = thisFrame.data[0] >> 4;
|
||||
if (temp == 0) //single frame reply (maybe)
|
||||
|
||||
Reference in New Issue
Block a user