From a66e63ced9ae8c967eef50a841c7aef7163be465 Mon Sep 17 00:00:00 2001 From: Andy Huska Date: Thu, 11 May 2023 16:45:41 -0500 Subject: [PATCH] Fixed some DBC file format errors frame ID for extended IDs was not having its upper bit set BA_DEF_DEF_ "filterlabeling" is INT type but was getting bool written (e.g. 'false' instead of 0) --- dbc/dbchandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbc/dbchandler.cpp b/dbc/dbchandler.cpp index b65de70..77a704f 100644 --- a/dbc/dbchandler.cpp +++ b/dbc/dbchandler.cpp @@ -1391,7 +1391,7 @@ bool DBCFile::saveFile(QString fileName) uint32_t ID = msg->ID; if (msg->ID > 0x7FF || msg->extendedID) { - msg->ID += 0x80000000ul; //set bit 31 if this ID is extended. + ID += 0x80000000ul; //set bit 31 if this ID is extended. } msgOutput.append("BO_ " + QString::number(ID) + " " + msg->name + ": " + QString::number(msg->len) + @@ -2256,7 +2256,7 @@ DBCHandler::DBCHandler() file->dbc_attributes.append(attr); file->messageHandler->setMatchingCriteria(matchingCriteria); - bool filterLabeling = settings.value("DBC/FilterLabeling_" + QString(i),0).toBool(); + int filterLabeling = settings.value("DBC/FilterLabeling_" + QString(i),0).toInt(); attr.attrType = ATTR_TYPE_MESSAGE; attr.defaultValue = filterLabeling; attr.enumVals.clear();