Cleaned out comment blocks from debug and fixed framesender not showing

count until a number is manually entered (it was seeing the null item,
creating the item, but not putting it in the table).
This commit is contained in:
Andy Huska
2022-11-02 15:32:39 -05:00
parent 6ef4c2ddfa
commit a7acaac2fb
2 changed files with 4 additions and 43 deletions
-40
View File
@@ -204,7 +204,6 @@ bool CANConManager::sendFrame(const CANFrame& pFrame)
{ {
int busBase = 0; int busBase = 0;
CANFrame workingFrame = pFrame; CANFrame workingFrame = pFrame;
CANFrame *txFrame;
if (mConns.count() == 0) if (mConns.count() == 0)
{ {
@@ -229,45 +228,6 @@ bool CANConManager::sendFrame(const CANFrame& pFrame)
//workingFrame.timestamp -= mTimestampBasis; //workingFrame.timestamp -= mTimestampBasis;
} }
// CANFrame frameCopy;
// frameCopy.bus = workingFrame.bus;
// //cFrame.timedelta
// /////////////////////////////////////////////
// QByteArray copiedData;
// for(int i=0; i<workingFrame.payload().length(); i++)
// copiedData.append(workingFrame.payload()[i]);
// frameCopy.setPayload(copiedData);
// //frameCopy.setPayload(pFrame.payload());
// frameCopy.bus = workingFrame.bus;
// if (workingFrame.frameType() == workingFrame.ErrorFrame)
// {
// frameCopy.setExtendedFrameFormat(workingFrame.hasExtendedFrameFormat());
// frameCopy.setFrameId(workingFrame.frameId() + 0x20000000ull);
// frameCopy.isReceived = true;
// }
// else
// {
// frameCopy.setExtendedFrameFormat(workingFrame.hasExtendedFrameFormat());
// frameCopy.setFrameId(workingFrame.frameId());
// }
// frameCopy.setTimeStamp(workingFrame.timeStamp());
// frameCopy.setFrameType(workingFrame.frameType());
// frameCopy.setError(workingFrame.error());
// ///* If recorded frame has a local echo, it is a Tx message, and thus should not be marked as Rx */
// frameCopy.isReceived = workingFrame.isReceived;
// ////////////////////////////////////////////
// txFrame = conn->getQueue().get();
// QCoreApplication::processEvents();
// *txFrame = frameCopy; //workingFrame
// conn->getQueue().queue();
return conn->sendFrame(workingFrame); return conn->sendFrame(workingFrame);
} }
busBase += conn->getNumBuses(); busBase += conn->getNumBuses();
+4 -3
View File
@@ -821,12 +821,13 @@ void FrameSenderWindow::updateGridRow(int idx)
if (item == nullptr) if (item == nullptr)
{ {
//item = new QTableWidgetItem(); item = new QTableWidgetItem();
//item->setText(QString::number(temp->count)); //crashes here ---qt_Static_metacall -> handleTick ->here item->setText(QString::number(temp->count));
ui->tableSender->setItem(gridLine, 9, item);
} }
else else
{ {
item->setText(QString::number(temp->count)); //crashes here ---qt_Static_metacall -> handleTick ->here item->setText(QString::number(temp->count));
} }
if (temp->frameType() != QCanBusFrame::RemoteRequestFrame) if (temp->frameType() != QCanBusFrame::RemoteRequestFrame)