From 799d4ca617b1373bdaea3fb44706589c18e378c6 Mon Sep 17 00:00:00 2001 From: Collin Kidder Date: Fri, 22 May 2015 23:06:26 -0400 Subject: [PATCH] Notes about what needs to be done, fixed CRTD import, preallocate more memory upon startup. --- canframemodel.cpp | 2 +- mainwindow.cpp | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/canframemodel.cpp b/canframemodel.cpp index b5c7cc8..3a4d198 100644 --- a/canframemodel.cpp +++ b/canframemodel.cpp @@ -13,7 +13,7 @@ int CANFrameModel::columnCount(const QModelIndex &index) const CANFrameModel::CANFrameModel(QObject *parent) : QAbstractTableModel(parent) { - frames.reserve(100000); //ask for at least 100,000 entries. This gives good performance up to this limit + frames.reserve(10000000); //yes, I'm preallocating 10 million entries in this list. I don't think anyone will exceed this. dbcHandler = NULL; interpretFrames = false; overwriteDups = false; diff --git a/mainwindow.cpp b/mainwindow.cpp index 7bba85e..5a3fbd7 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -19,6 +19,16 @@ Things that were planned for the GVRET-PC project but never completed. Single / Multi state - The goal is to find bits that change based on toggles or discrete state items (shifters, etc) Range state - Find things that range like accelerator pedal inputs, road speed, tach, etc fuzzy scope - Try to find potential places where a given value might be stored - offer guesses and the program tries to find candidates for you + + +Things currently broken or in need of attention: +1. It should be possible to stop the capture at any time. +2. The details window should tell you the min/max/avg time between frames of this ID +3. Frame reception gets weird somewhere between 100k and 150k frames. Increase prealloc and re-test +4. Expanding the main window (while having a large capture going?) could lock up the program +5. Clicking one of the three main checkboxes (auto scroll, interpret, overwrite) locks up reception +6. The windows that deal with canbus data should update based on incoming frames. It should not be required to load files to use these windows +7. Overall, test more often with large captures coming in. Use Kvaser to simulate incoming data in large quantities. */ @@ -205,7 +215,7 @@ void MainWindow::loadCRTDFile(QString filename) line = inFile->readLine(); //read out the header first and discard it. while (!inFile->atEnd()) { - line = inFile->readLine(); + line = inFile->readLine().simplified(); if (line.length() > 2) { QList tokens = line.split(' ');