Many little fixes to clean up warnings and bugs.
This commit is contained in:
+2
-2
@@ -103,8 +103,8 @@ void BisectWindow::handleCalculateButton()
|
||||
}
|
||||
else if (ui->rbIDRange->isChecked())
|
||||
{
|
||||
int lowerID = Utility::ParseStringToNum2(ui->cbIDLower->currentText());
|
||||
int upperID = Utility::ParseStringToNum2(ui->cbIDUpper->currentText());
|
||||
uint32_t lowerID = Utility::ParseStringToNum2(ui->cbIDLower->currentText());
|
||||
uint32_t upperID = Utility::ParseStringToNum2(ui->cbIDUpper->currentText());
|
||||
for (int i = 0; i < modelFrames->count(); i++)
|
||||
{
|
||||
if (modelFrames->at(i).ID >= lowerID && modelFrames->at(i).ID <= upperID) splitFrames.append(modelFrames->at(i));
|
||||
|
||||
+3
-3
@@ -7,8 +7,8 @@
|
||||
struct CANFrame
|
||||
{
|
||||
public:
|
||||
int ID;
|
||||
int bus;
|
||||
uint32_t ID;
|
||||
uint32_t bus;
|
||||
bool extended;
|
||||
bool isReceived; //did we receive this or send it?
|
||||
uint32_t len;
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
struct ISOTP_MESSAGE
|
||||
{
|
||||
public:
|
||||
int ID;
|
||||
uint32_t ID;
|
||||
int bus;
|
||||
bool extended;
|
||||
bool isReceived;
|
||||
|
||||
+3
-3
@@ -131,7 +131,7 @@ void CANFrameModel::setOverwriteMode(bool mode)
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
void CANFrameModel::setFilterState(int ID, bool state)
|
||||
void CANFrameModel::setFilterState(unsigned int ID, bool state)
|
||||
{
|
||||
if (!filters.contains(ID)) return;
|
||||
filters[ID] = state;
|
||||
@@ -263,7 +263,7 @@ QVariant CANFrameModel::data(const QModelIndex &index, int role) const
|
||||
return QVariant();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
@@ -480,7 +480,7 @@ void CANFrameModel::insertFrames(const QVector<CANFrame> &newFrames)
|
||||
if (needFilterRefresh) emit updatedFiltersList();
|
||||
}
|
||||
|
||||
int CANFrameModel::getIndexFromTimeID(int ID, double timestamp)
|
||||
int CANFrameModel::getIndexFromTimeID(unsigned int ID, double timestamp)
|
||||
{
|
||||
int bestIndex = -1;
|
||||
uint64_t intTimeStamp = timestamp * 1000000l;
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@ public:
|
||||
void setInterpetMode(bool);
|
||||
void setOverwriteMode(bool);
|
||||
void setHexMode(bool);
|
||||
void setFilterState(int ID, bool state);
|
||||
void setFilterState(unsigned int ID, bool state);
|
||||
void setAllFilters(bool state);
|
||||
void setSecondsMode(bool);
|
||||
void loadFilterFile(QString filename);
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
void recalcOverwrite();
|
||||
bool needsFilterRefresh();
|
||||
void insertFrames(const QVector<CANFrame> &newFrames);
|
||||
int getIndexFromTimeID(int ID, double timestamp);
|
||||
int getIndexFromTimeID(unsigned int ID, double timestamp);
|
||||
const QVector<CANFrame> *getListReference() const; //thou shalt not modify these frames externally!
|
||||
const QVector<CANFrame> *getFilteredListReference() const; //Thus saith the Lord, NO.
|
||||
const QMap<int, bool> *getFiltersReference() const; //this neither
|
||||
|
||||
@@ -155,7 +155,7 @@ bool CANConManager::sendFrame(const CANFrame& pFrame)
|
||||
foreach (CANConnection* conn, mConns)
|
||||
{
|
||||
//check if this CAN connection is supposed to handle the requested bus
|
||||
if (pFrame.bus < busBase + conn->getNumBuses())
|
||||
if (pFrame.bus < (uint32_t)(busBase + conn->getNumBuses()))
|
||||
{
|
||||
workingFrame.bus -= busBase;
|
||||
workingFrame.isReceived = false;
|
||||
@@ -203,6 +203,7 @@ bool CANConManager::addTargettedFrame(int pBusId, const CANFlt &target)
|
||||
}
|
||||
busBase += conn->getNumBuses();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CANConManager::removeTargettedFrame(int pBusId, const CANFlt &target)
|
||||
@@ -221,6 +222,7 @@ bool CANConManager::removeTargettedFrame(int pBusId, const CANFlt &target)
|
||||
}
|
||||
busBase += conn->getNumBuses();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -275,7 +275,7 @@ bool CANConnection::addTargettedFrame(int pBusId, const CANFlt &target)
|
||||
|
||||
for (int i = 0; i < getNumBuses(); i++)
|
||||
{
|
||||
if (pBusId == -1 || pBusId && (1 << i)) {
|
||||
if ( (pBusId == -1) || (pBusId && (1 << i)) ) {
|
||||
qDebug() << "Connection is registering a new targetted frame filter";
|
||||
mBusData_p[i].mTargettedFrames.append(target);
|
||||
}
|
||||
@@ -312,7 +312,7 @@ bool CANConnection::removeTargettedFrame(int pBusId, const CANFlt &target)
|
||||
|
||||
void CANConnection::checkTargettedFrame(CANFrame &frame)
|
||||
{
|
||||
int maskedID;
|
||||
unsigned int maskedID;
|
||||
foreach (const CANFlt filt, mBusData_p[frame.bus].mTargettedFrames)
|
||||
{
|
||||
maskedID = frame.ID & filt.mask;
|
||||
|
||||
@@ -146,10 +146,8 @@ void GVRetSerial::piSetBusSettings(int pBusIdx, CANBus bus)
|
||||
bool GVRetSerial::piSendFrame(const CANFrame& frame)
|
||||
{
|
||||
QByteArray buffer;
|
||||
int c;
|
||||
unsigned int c;
|
||||
int ID;
|
||||
CANFrame tempFrame = frame;
|
||||
tempFrame.isReceived = false;
|
||||
|
||||
//qDebug() << "Sending out GVRET frame with id " << frame.ID << " on bus " << frame.bus;
|
||||
|
||||
@@ -386,7 +384,7 @@ void GVRetSerial::procRXChar(unsigned char c)
|
||||
break;
|
||||
case 7:
|
||||
buildFrame.ID |= c << 24;
|
||||
if ((buildFrame.ID & 1 << 31) == 1 << 31)
|
||||
if ((buildFrame.ID & 1 << 31) == 1u << 31)
|
||||
{
|
||||
buildFrame.ID &= 0x7FFFFFFF;
|
||||
buildFrame.extended = true;
|
||||
|
||||
@@ -77,7 +77,7 @@ protected:
|
||||
QSerialPort *serial;
|
||||
int framesRapid;
|
||||
STATE rx_state;
|
||||
int rx_step;
|
||||
uint32_t rx_step;
|
||||
CANFrame buildFrame;
|
||||
int can0Baud, can1Baud;
|
||||
bool can0Enabled, can1Enabled;
|
||||
|
||||
@@ -150,6 +150,7 @@ void SocketCan::errorReceived(QCanBusDevice::CanBusError error) const
|
||||
|
||||
void SocketCan::framesWritten(qint64 count)
|
||||
{
|
||||
Q_UNUSED(count);
|
||||
//qDebug() << "Number of frames written:" << count;
|
||||
}
|
||||
|
||||
|
||||
+7
-5
@@ -37,6 +37,7 @@ bool DBCSignalHandler::addSignal(DBC_SIGNAL &sig)
|
||||
|
||||
bool DBCSignalHandler::removeSignal(DBC_SIGNAL *sig)
|
||||
{
|
||||
Q_UNUSED(sig);
|
||||
//if (sigs.removeAll(*sig) > 0) return true;
|
||||
return false;
|
||||
}
|
||||
@@ -75,7 +76,7 @@ int DBCSignalHandler::getCount()
|
||||
return sigs.count();
|
||||
}
|
||||
|
||||
DBC_MESSAGE* DBCMessageHandler::findMsgByID(int id)
|
||||
DBC_MESSAGE* DBCMessageHandler::findMsgByID(uint32_t id)
|
||||
{
|
||||
if (messages.count() == 0) return NULL;
|
||||
for (int i = 0; i < messages.count(); i++)
|
||||
@@ -117,6 +118,7 @@ bool DBCMessageHandler::addMessage(DBC_MESSAGE &msg)
|
||||
|
||||
bool DBCMessageHandler::removeMessage(DBC_MESSAGE *msg)
|
||||
{
|
||||
Q_UNUSED(msg);
|
||||
//if (messages.removeAll(*msg) > 0) return true;
|
||||
return false;
|
||||
}
|
||||
@@ -130,7 +132,7 @@ bool DBCMessageHandler::removeMessageByIndex(int idx)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DBCMessageHandler::removeMessage(int ID)
|
||||
bool DBCMessageHandler::removeMessage(uint32_t ID)
|
||||
{
|
||||
bool foundSome = false;
|
||||
if (messages.count() == 0) return false;
|
||||
@@ -302,7 +304,7 @@ void DBCFile::loadFile(QString fileName)
|
||||
{
|
||||
int offset = 0;
|
||||
bool isMultiplexor = false;
|
||||
bool isMultiplexed = false;
|
||||
//bool isMultiplexed = false;
|
||||
DBC_SIGNAL sig;
|
||||
|
||||
sig.multiplexValue = 0;
|
||||
@@ -326,7 +328,7 @@ void DBCFile::loadFile(QString fileName)
|
||||
if (match.hasMatch())
|
||||
{
|
||||
qDebug() << "Multiplexed signal";
|
||||
isMultiplexed = true;
|
||||
//isMultiplexed = true;
|
||||
sig.isMultiplexed = true;
|
||||
sig.multiplexValue = match.captured(2).toInt();
|
||||
offset = 1;
|
||||
@@ -805,7 +807,7 @@ DBC_MESSAGE* DBCHandler::findMessage(const CANFrame &frame)
|
||||
{
|
||||
for(int i = 0; i < loadedFiles.count(); i++)
|
||||
{
|
||||
if (loadedFiles[i].getAssocBus() == -1 || frame.bus == loadedFiles[i].getAssocBus())
|
||||
if (loadedFiles[i].getAssocBus() == -1 || frame.bus == (unsigned int)loadedFiles[i].getAssocBus())
|
||||
{
|
||||
DBC_MESSAGE* msg = loadedFiles[i].messageHandler->findMsgByID(frame.ID);
|
||||
if (msg != NULL) return msg;
|
||||
|
||||
+2
-2
@@ -32,13 +32,13 @@ class DBCMessageHandler: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DBC_MESSAGE *findMsgByID(int id);
|
||||
DBC_MESSAGE *findMsgByID(uint32_t id);
|
||||
DBC_MESSAGE *findMsgByIdx(int idx);
|
||||
DBC_MESSAGE *findMsgByName(QString name);
|
||||
bool addMessage(DBC_MESSAGE &msg);
|
||||
bool removeMessage(DBC_MESSAGE *msg);
|
||||
bool removeMessageByIndex(int idx);
|
||||
bool removeMessage(int ID);
|
||||
bool removeMessage(uint32_t ID);
|
||||
bool removeMessage(QString name);
|
||||
void removeAllMessages();
|
||||
int getCount();
|
||||
|
||||
@@ -114,6 +114,7 @@ void DBCLoadSaveWindow::cellChanged(int row, int col)
|
||||
|
||||
void DBCLoadSaveWindow::cellDoubleClicked(int row, int col)
|
||||
{
|
||||
Q_UNUSED(col)
|
||||
editorWindow->setFileIdx(row);
|
||||
editorWindow->show();
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ void FirmwareUploaderWindow::updateProgress()
|
||||
|
||||
void FirmwareUploaderWindow::updatedFrames(int numFrames)
|
||||
{
|
||||
CANFrame thisFrame;
|
||||
//CANFrame thisFrame;
|
||||
if (numFrames == -1) //all frames deleted.
|
||||
{
|
||||
}
|
||||
@@ -76,7 +76,7 @@ void FirmwareUploaderWindow::updatedFrames(int numFrames)
|
||||
void FirmwareUploaderWindow::gotTargettedFrame(CANFrame frame)
|
||||
{
|
||||
qDebug() << "FUW: Got targetted frame with id " << frame.ID;
|
||||
if (frame.ID == (baseAddress + 0x10)) {
|
||||
if (frame.ID == (uint32_t)(baseAddress + 0x10)) {
|
||||
qDebug() << "Start firmware reply";
|
||||
if ((frame.data[0] == 0xAD) && (frame.data[1] == 0xDE))
|
||||
{
|
||||
@@ -97,7 +97,7 @@ void FirmwareUploaderWindow::gotTargettedFrame(CANFrame frame)
|
||||
}
|
||||
}
|
||||
|
||||
if (frame.ID == (baseAddress + 0x20)) {
|
||||
if (frame.ID == (uint32_t)(baseAddress + 0x20)) {
|
||||
qDebug() << "Firmware reception success reply";
|
||||
int seq = frame.data[0] + (256 * frame.data[1]);
|
||||
if (seq == currentSendingPosition)
|
||||
@@ -201,7 +201,6 @@ void FirmwareUploaderWindow::handleLoadFile()
|
||||
{
|
||||
QString filename;
|
||||
QFileDialog dialog;
|
||||
bool result = false;
|
||||
|
||||
QStringList filters;
|
||||
filters.append(QString(tr("Raw firmware binary (*.bin)")));
|
||||
|
||||
+4
-2
@@ -246,6 +246,8 @@ bool FrameFileIO::loadVehicleSpyFile(QString filename, QVector<CANFrame> *frames
|
||||
|
||||
bool FrameFileIO::saveVehicleSpyFile(QString filename, const QVector<CANFrame> *frames)
|
||||
{
|
||||
Q_UNUSED(filename);
|
||||
Q_UNUSED(frames);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -440,7 +442,7 @@ bool FrameFileIO::loadPCANFile(QString filename, QVector<CANFrame>* frames)
|
||||
thisFrame.bus = 0;
|
||||
thisFrame.extended = false;
|
||||
QList<QByteArray> tokens = line.mid(41, thisFrame.len * 3).split(' ');
|
||||
for (int d = 0; d < thisFrame.len; d++)
|
||||
for (unsigned int d = 0; d < thisFrame.len; d++)
|
||||
{
|
||||
if (tokens[d] != "")
|
||||
{
|
||||
@@ -580,7 +582,7 @@ bool FrameFileIO::saveNativeCSVFile(QString filename, const QVector<CANFrame>* f
|
||||
outFile->write(QString::number(frames->at(c).len).toUtf8());
|
||||
outFile->putChar(44);
|
||||
|
||||
for (int temp = 0; temp < 8; temp++)
|
||||
for (unsigned int temp = 0; temp < 8; temp++)
|
||||
{
|
||||
if (temp < frames->at(c).len)
|
||||
outFile->write(QString::number(frames->at(c).data[temp], 16).toUpper().rightJustified(2, '0').toUtf8());
|
||||
|
||||
@@ -594,7 +594,7 @@ void FramePlaybackWindow::updatePosition(bool forward)
|
||||
thisFrame->bus = whichBusSend;
|
||||
sendingBuffer.append(*thisFrame);
|
||||
}
|
||||
else if (whichBusSend = ui->comboCANBus->count() - 2) //all
|
||||
else if (whichBusSend == (ui->comboCANBus->count() - 2)) //all
|
||||
{
|
||||
for (int c = 0; c < ui->comboCANBus->count() - 2; c++)
|
||||
{
|
||||
|
||||
@@ -140,9 +140,9 @@ void FrameSenderWindow::processIncomingFrame(CANFrame *frame)
|
||||
Trigger *thisTrigger = &sendingData[sd].triggers[trig];
|
||||
qDebug() << "Trigger ID: " << thisTrigger->ID;
|
||||
qDebug() << "Frame ID: " << frame->ID;
|
||||
if (thisTrigger->ID > 0 && thisTrigger->ID == frame->ID)
|
||||
if (thisTrigger->ID > 0 && (uint32_t)thisTrigger->ID == frame->ID)
|
||||
{
|
||||
if (thisTrigger->bus == frame->bus || thisTrigger->bus == -1)
|
||||
if ((uint32_t)thisTrigger->bus == frame->bus || thisTrigger->bus == -1)
|
||||
{
|
||||
if (thisTrigger->currCount < thisTrigger->maxCount)
|
||||
{
|
||||
@@ -458,7 +458,7 @@ CANFrame* FrameSenderWindow::lookupFrame(int ID, int bus)
|
||||
{
|
||||
if (!frameCache.contains(ID)) return NULL;
|
||||
|
||||
if (bus == -1 || frameCache[ID].bus == bus) return &frameCache[ID];
|
||||
if (bus == -1 || frameCache[ID].bus == (unsigned int)bus) return &frameCache[ID];
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -472,7 +472,7 @@ void FrameSenderWindow::processModifierText(int line)
|
||||
{
|
||||
qDebug() << "processModifierText";
|
||||
QString modString;
|
||||
bool firstOp = true;
|
||||
//bool firstOp = true;
|
||||
bool abort = false;
|
||||
QString token;
|
||||
ModifierOp thisOp;
|
||||
@@ -496,7 +496,6 @@ void FrameSenderWindow::processModifierText(int line)
|
||||
{
|
||||
Modifier thisMod;
|
||||
thisMod.destByte = 0;
|
||||
firstOp = true;
|
||||
|
||||
QString leftSide = Utility::grabAlphaNumeric(mods[i]);
|
||||
if (leftSide.startsWith("D") && leftSide.length() == 2)
|
||||
@@ -702,7 +701,7 @@ void FrameSenderWindow::updateGridRow(int idx)
|
||||
QTableWidgetItem *item = ui->tableSender->item(gridLine, 7);
|
||||
if (item == NULL) item = new QTableWidgetItem();
|
||||
item->setText(QString::number(temp->count));
|
||||
for (int i = 0; i < temp->len; i++)
|
||||
for (unsigned int i = 0; i < temp->len; i++)
|
||||
{
|
||||
dataString.append(Utility::formatNumber(temp->data[i]));
|
||||
dataString.append(" ");
|
||||
|
||||
@@ -381,6 +381,10 @@ void MainWindow::writeSettings()
|
||||
|
||||
void MainWindow::updateConnectionSettings(QString connectionType, QString port, int speed0, int speed1)
|
||||
{
|
||||
Q_UNUSED(connectionType);
|
||||
Q_UNUSED(port);
|
||||
Q_UNUSED(speed0);
|
||||
Q_UNUSED(speed1);
|
||||
//connType = connectionType;
|
||||
//portName = port;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
+1
-2
@@ -127,8 +127,7 @@ void ScriptContainer::sendFrame(QJSValue bus, QJSValue id, QJSValue length, QJSV
|
||||
frame.data[i] = (uint8_t)data.property(i).toInt();
|
||||
}
|
||||
|
||||
frame.bus = bus.toInt();
|
||||
if (frame.bus < 0) frame.bus = 0;
|
||||
frame.bus = (uint32_t)bus.toInt();
|
||||
if (frame.bus > 1) frame.bus = 1;
|
||||
|
||||
if (frame.ID > 0x7FF) frame.extended = true;
|
||||
|
||||
@@ -87,7 +87,6 @@ void ScriptingWindow::loadNewScript()
|
||||
{
|
||||
QString filename;
|
||||
QFileDialog dialog;
|
||||
bool result = false;
|
||||
ScriptContainer *container;
|
||||
|
||||
QStringList filters;
|
||||
|
||||
Reference in New Issue
Block a user