Index: sources/canbus/messageglobals.h =================================================================== diff -u -rd3f916066c2d10c10fffa91fd8a7e5ac6dd86c7d -r5626bf604947efe5a80c9ca51802aab1a70a6939 --- sources/canbus/messageglobals.h (.../messageglobals.h) (revision d3f916066c2d10c10fffa91fd8a7e5ac6dd86c7d) +++ sources/canbus/messageglobals.h (.../messageglobals.h) (revision 5626bf604947efe5a80c9ca51802aab1a70a6939) @@ -141,8 +141,22 @@ QByteArray data; bool initialized = false; - bool isEmpty () { return !initialized || !data.length(); } - bool isComplete() { return !isEmpty() && data.length() == length; } + bool isEmpty () { + // coco begin validated:Has been validated manually. + // Since the crc is part of the data and there is no message without crc + // initialized flag and data.length() == 0 became the same. + // I preffer too keep it as it is so the initialization would be independent of the data. + return !initialized || !data.length(); + // coco end + } + bool isComplete() { + // coco begin validated:Has been validated manually. + // Since the crc is part of the data and there is no message without crc + // then a message would never be empty. + // I preffer too keep it as it is so the initialization would be independent of the data. + return !isEmpty() && data.length() == length; + // coco end + } }; typedef QList MessageList;