Changed text in settings window to more clearly explain what the max
frames / prealloc setting does, some other minor bug fixes and extra comments in code.
This commit is contained in:
@@ -61,6 +61,9 @@ CANFrameModel::CANFrameModel(QObject *parent)
|
||||
QSettings settings;
|
||||
preallocSize = settings.value("Main/MaximumFrames", maxFramesDefault).toInt();
|
||||
|
||||
//Each CANFrame object takes up 56 bytes and we're allocating two arrays here so take the
|
||||
//# of pre-alloc frames and multiply by 112 to get the RAM usage. This is around 1GiB for the default.
|
||||
|
||||
//the goal is to prevent a reallocation from ever happening
|
||||
frames.reserve(preallocSize);
|
||||
filteredFrames.reserve(preallocSize);
|
||||
|
||||
@@ -2024,6 +2024,9 @@ bool FrameFileIO::loadNativeCSVFile(QString filename, QVector<CANFrame>* frames)
|
||||
if (tokens[2].toUpper().contains("TRUE")) thisFrame.setExtendedFrameFormat(true);
|
||||
else thisFrame.setExtendedFrameFormat(false);
|
||||
|
||||
//fix for faulty files that fail to set the extended flag when they should
|
||||
if (thisFrame.frameId() > 0x7FF) thisFrame.setExtendedFrameFormat(true);
|
||||
|
||||
thisFrame.setFrameType(QCanBusFrame::DataFrame);
|
||||
|
||||
if (fileVersion == 1)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>965</width>
|
||||
<height>815</height>
|
||||
<height>852</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -115,7 +115,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Maximum Frames to Capture</string>
|
||||
<string>CAN Frame Pre-allocation Size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -216,7 +216,7 @@ public:
|
||||
}
|
||||
|
||||
/* A unified function that can extract a signal from the (up to) 64 bits of data bytes in a CAN frame
|
||||
* handles both little and big endian signals (and floats too but that's untested).
|
||||
* handles both little and big endian signals (and floats too).
|
||||
*/
|
||||
static int64_t processIntegerSignal(const QByteArray data, int startBit, int sigSize, bool littleEndian, bool isSigned)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user