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:
@@ -74,7 +74,7 @@ void FuzzingWindow::updatedFrames(int numFrames)
|
||||
foundIDs.append(id);
|
||||
selectedIDs.append(id);
|
||||
QListWidgetItem *thisItem = new QListWidgetItem();
|
||||
thisItem->setText(Utility::formatNumber(id));
|
||||
thisItem->setText(Utility::formatCANID(id, modelFrames->at(i).extended));
|
||||
thisItem->setFlags(thisItem->flags() | Qt::ItemIsUserCheckable);
|
||||
thisItem->setCheckState(Qt::Checked);
|
||||
ui->listID->addItem(thisItem);
|
||||
@@ -346,14 +346,15 @@ void FuzzingWindow::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 (!foundIDs.contains(id))
|
||||
{
|
||||
foundIDs.append(id);
|
||||
selectedIDs.append(id);
|
||||
QListWidgetItem *thisItem = new QListWidgetItem();
|
||||
thisItem->setText(Utility::formatNumber(id));
|
||||
thisItem->setText(Utility::formatCANID(id, thisFrame.extended));
|
||||
thisItem->setFlags(thisItem->flags() | Qt::ItemIsUserCheckable);
|
||||
thisItem->setCheckState(Qt::Checked);
|
||||
ui->listID->addItem(thisItem);
|
||||
|
||||
Reference in New Issue
Block a user