More changes meant just to fix up compiler warnings.
This commit is contained in:
+2
-2
@@ -9,11 +9,11 @@ struct CANFrame
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
uint32_t ID;
|
uint32_t ID;
|
||||||
uint32_t bus;
|
int bus;
|
||||||
bool extended;
|
bool extended;
|
||||||
bool remote;
|
bool remote;
|
||||||
bool isReceived; //did we receive this or send it?
|
bool isReceived; //did we receive this or send it?
|
||||||
uint32_t len;
|
int len;
|
||||||
unsigned char data[8];
|
unsigned char data[8];
|
||||||
uint64_t timestamp;
|
uint64_t timestamp;
|
||||||
uint64_t timedelta;
|
uint64_t timedelta;
|
||||||
|
|||||||
@@ -941,6 +941,7 @@ void GVRetSerial::procRXChar(unsigned char c)
|
|||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
lin1Baud |= c << 24;
|
lin1Baud |= c << 24;
|
||||||
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
lin2Enabled = (c & 0xF);
|
lin2Enabled = (c & 0xF);
|
||||||
break;
|
break;
|
||||||
@@ -1018,7 +1019,10 @@ void GVRetSerial::handleTick()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (doValidation); //qDebug() << "Comm connection validated";
|
else if (doValidation)
|
||||||
|
{
|
||||||
|
//qDebug() << "Comm connection validated";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (doValidation && serial && serial->isOpen()) sendCommValidation();
|
if (doValidation && serial && serial->isOpen()) sendCommValidation();
|
||||||
if (doValidation && tcpClient && tcpClient->isOpen()) sendCommValidation();
|
if (doValidation && tcpClient && tcpClient->isOpen()) sendCommValidation();
|
||||||
|
|||||||
+5
-4
@@ -155,15 +155,16 @@ bool DBC_SIGNAL::processAsInt(const CANFrame &frame, int32_t &outValue)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (valType == SIGNED_INT) isSigned = true;
|
if (valType == SIGNED_INT) isSigned = true;
|
||||||
if ( frame.len*8 < (startBit+signalSize) )
|
if ( static_cast<int>(frame.len * 8) < (startBit + signalSize) )
|
||||||
{
|
{
|
||||||
result = 0;
|
result = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
result = Utility::processIntegerSignal(frame.data, startBit, signalSize, intelByteOrder, isSigned);
|
|
||||||
|
|
||||||
double endResult = ((double)result * factor) + bias;
|
result = static_cast<int32_t>(Utility::processIntegerSignal(frame.data, startBit, signalSize, intelByteOrder, isSigned));
|
||||||
result = (int32_t)endResult;
|
|
||||||
|
double endResult = (result * factor) + bias;
|
||||||
|
result = static_cast<int32_t>(endResult);
|
||||||
cachedValue = result;
|
cachedValue = result;
|
||||||
outValue = result;
|
outValue = result;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
+1
-1
@@ -219,7 +219,7 @@ DBCFile::DBCFile()
|
|||||||
messageHandler->setJ1939(false);
|
messageHandler->setJ1939(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
DBCFile::DBCFile(const DBCFile& cpy)
|
DBCFile::DBCFile(const DBCFile& cpy) : QObject()
|
||||||
{
|
{
|
||||||
messageHandler = new DBCMessageHandler;
|
messageHandler = new DBCMessageHandler;
|
||||||
for (int i = 0 ; i < cpy.messageHandler->getCount() ; i++)
|
for (int i = 0 ; i < cpy.messageHandler->getCount() ; i++)
|
||||||
|
|||||||
+11
-12
@@ -118,7 +118,6 @@ bool FrameInfoWindow::eventFilter(QObject *obj, QEvent *event)
|
|||||||
// standard event processing
|
// standard event processing
|
||||||
return QObject::eventFilter(obj, event);
|
return QObject::eventFilter(obj, event);
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FrameInfoWindow::~FrameInfoWindow()
|
FrameInfoWindow::~FrameInfoWindow()
|
||||||
@@ -186,12 +185,12 @@ void FrameInfoWindow::updatedFrames(int numFrames)
|
|||||||
|
|
||||||
unsigned int currID = 0;
|
unsigned int currID = 0;
|
||||||
if (ui->listFrameID->currentItem())
|
if (ui->listFrameID->currentItem())
|
||||||
currID = (unsigned int)ui->listFrameID->currentItem()->text().toInt(nullptr, 16);
|
currID = static_cast<unsigned int>(ui->listFrameID->currentItem()->text().toInt(nullptr, 16));
|
||||||
bool thisID = false;
|
bool thisID = false;
|
||||||
for (int x = modelFrames->count() - numFrames; x < modelFrames->count(); x++)
|
for (int x = modelFrames->count() - numFrames; x < modelFrames->count(); x++)
|
||||||
{
|
{
|
||||||
CANFrame thisFrame = modelFrames->at(x);
|
CANFrame thisFrame = modelFrames->at(x);
|
||||||
unsigned int id = thisFrame.ID;
|
int32_t id = static_cast<int32_t>(thisFrame.ID);
|
||||||
if (!foundID.contains(id))
|
if (!foundID.contains(id))
|
||||||
{
|
{
|
||||||
foundID.append(id);
|
foundID.append(id);
|
||||||
@@ -240,7 +239,7 @@ void FrameInfoWindow::updateDetailsWindow(QString newID)
|
|||||||
uint8_t referenceBits[8];
|
uint8_t referenceBits[8];
|
||||||
QTreeWidgetItem *baseNode, *dataBase, *histBase, *tempItem;
|
QTreeWidgetItem *baseNode, *dataBase, *histBase, *tempItem;
|
||||||
|
|
||||||
targettedID = Utility::ParseStringToNum(newID);
|
targettedID = static_cast<int>(Utility::ParseStringToNum(newID));
|
||||||
|
|
||||||
if (modelFrames->count() == 0) return;
|
if (modelFrames->count() == 0) return;
|
||||||
|
|
||||||
@@ -255,7 +254,7 @@ void FrameInfoWindow::updateDetailsWindow(QString newID)
|
|||||||
for (int i = 0; i < modelFrames->count(); i++)
|
for (int i = 0; i < modelFrames->count(); i++)
|
||||||
{
|
{
|
||||||
CANFrame thisFrame = modelFrames->at(i);
|
CANFrame thisFrame = modelFrames->at(i);
|
||||||
if (thisFrame.ID == (unsigned int)targettedID) frameCache.append(thisFrame);
|
if (thisFrame.ID == static_cast<uint32_t>(targettedID)) frameCache.append(thisFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->treeDetails->clear();
|
ui->treeDetails->clear();
|
||||||
@@ -286,23 +285,23 @@ void FrameInfoWindow::updateDetailsWindow(QString newID)
|
|||||||
{
|
{
|
||||||
jid.dest = jid.ps;
|
jid.dest = jid.ps;
|
||||||
tempItem = new QTreeWidgetItem();
|
tempItem = new QTreeWidgetItem();
|
||||||
tempItem->setText(0, tr("Destination ID: ") + Utility::formatNumber(jid.dest));
|
tempItem->setText(0, tr("Destination ID: ") + Utility::formatNumber(static_cast<uint64_t>(jid.dest)));
|
||||||
baseNode->addChild(tempItem);
|
baseNode->addChild(tempItem);
|
||||||
}
|
}
|
||||||
tempItem = new QTreeWidgetItem();
|
tempItem = new QTreeWidgetItem();
|
||||||
tempItem->setText(0, tr("SRC: ") + Utility::formatNumber(jid.src));
|
tempItem->setText(0, tr("SRC: ") + Utility::formatNumber(static_cast<uint64_t>(jid.src)));
|
||||||
baseNode->addChild(tempItem);
|
baseNode->addChild(tempItem);
|
||||||
|
|
||||||
tempItem = new QTreeWidgetItem();
|
tempItem = new QTreeWidgetItem();
|
||||||
tempItem->setText(0, tr("PGN: ") + Utility::formatNumber(jid.pgn) + "(" + QString::number(jid.pgn) + ")");
|
tempItem->setText(0, tr("PGN: ") + Utility::formatNumber(static_cast<uint64_t>(jid.pgn)) + "(" + QString::number(jid.pgn) + ")");
|
||||||
baseNode->addChild(tempItem);
|
baseNode->addChild(tempItem);
|
||||||
|
|
||||||
tempItem = new QTreeWidgetItem();
|
tempItem = new QTreeWidgetItem();
|
||||||
tempItem->setText(0, tr("PF: ") + Utility::formatNumber(jid.pf));
|
tempItem->setText(0, tr("PF: ") + Utility::formatNumber(static_cast<uint64_t>(jid.pf)));
|
||||||
baseNode->addChild(tempItem);
|
baseNode->addChild(tempItem);
|
||||||
|
|
||||||
tempItem = new QTreeWidgetItem();
|
tempItem = new QTreeWidgetItem();
|
||||||
tempItem->setText(0, tr("PS: ") + Utility::formatNumber(jid.ps));
|
tempItem->setText(0, tr("PS: ") + Utility::formatNumber(static_cast<uint64_t>(jid.ps)));
|
||||||
baseNode->addChild(tempItem);
|
baseNode->addChild(tempItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -337,7 +336,7 @@ void FrameInfoWindow::updateDetailsWindow(QString newID)
|
|||||||
for (int j = 0; j < frameCache.count(); j++)
|
for (int j = 0; j < frameCache.count(); j++)
|
||||||
{
|
{
|
||||||
byteGraphX.append(j);
|
byteGraphX.append(j);
|
||||||
for (int bytcnt = 0; bytcnt < frameCache[j].len; bytcnt++)
|
for (uint32_t bytcnt = 0; bytcnt < frameCache[j].len; bytcnt++)
|
||||||
{
|
{
|
||||||
byteGraphY[bytcnt].append(frameCache[j].data[bytcnt]);
|
byteGraphY[bytcnt].append(frameCache[j].data[bytcnt]);
|
||||||
}
|
}
|
||||||
@@ -386,7 +385,7 @@ void FrameInfoWindow::updateDetailsWindow(QString newID)
|
|||||||
{
|
{
|
||||||
intervalMean = intervalSum / sortedIntervals.size();
|
intervalMean = intervalSum / sortedIntervals.size();
|
||||||
|
|
||||||
for(int l = 0; l < sortedIntervals.size(); l++) {
|
for(int l = 0; l < static_cast<int>(sortedIntervals.size()); l++) {
|
||||||
intervalVariance += ((sortedIntervals[l] - intervalMean) * (sortedIntervals[l] - intervalMean));
|
intervalVariance += ((sortedIntervals[l] - intervalMean) * (sortedIntervals[l] - intervalMean));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user