Make CAN id's either be 3 hex digits or 8 hex digits when displayed - depending on whether a frame uses standard or extended id mode.

This commit is contained in:
Collin Kidder
2017-11-26 16:30:48 -05:00
parent 1635e0ae44
commit 3b9c793e99
13 changed files with 55 additions and 27 deletions
+4 -3
View File
@@ -397,7 +397,7 @@ void FlowViewWindow::updatedFrames(int numFrames)
if (!foundID.contains(thisFrame.ID))
{
foundID.append(thisFrame.ID);
/*QListWidgetItem* item =*/ new QListWidgetItem(Utility::formatNumber(thisFrame.ID), ui->listFrameID);
/*QListWidgetItem* item =*/ new QListWidgetItem(Utility::formatCANID(thisFrame.ID, thisFrame.extended), ui->listFrameID);
}
if (thisFrame.ID == refID)
@@ -506,11 +506,12 @@ void FlowViewWindow::refreshIDList()
int id;
for (int i = 0; i < modelFrames->count(); i++)
{
id = modelFrames->at(i).ID;
CANFrame thisFrame = modelFrames->at(i);
id = thisFrame.ID;
if (!foundID.contains(id))
{
foundID.append(id);
/*QListWidgetItem* item = */ new QListWidgetItem(Utility::formatNumber(id), ui->listFrameID);
/*QListWidgetItem* item = */ new QListWidgetItem(Utility::formatCANID(id, thisFrame.extended), ui->listFrameID);
}
}
//default is to sort in ascending order