Fixes for many issues in flowview, graphing window, and frame playback.

In FlowView:
- Drastically improved functionality of live mode. It actually works now
- Fixed several crash bugs
- Program didn't used to pick up new frames properly. This is now corrected.

In Graphing window:
- Fixed dynamic updates to work properly even under heavy bus loads

In frame playback:
- Fixed a bug where single stepping through frames didn't send them over canbus
This commit is contained in:
Collin Kidder
2016-06-05 22:08:47 -04:00
parent be203ffef3
commit 9e37ded7cb
11 changed files with 202 additions and 24 deletions
+9 -3
View File
@@ -142,6 +142,7 @@ void GraphingWindow::updatedFrames(int numFrames)
}
else //just got some new frames. See if they are relevant.
{
bool appendedToGraph = false;
if (numFrames > modelFrames->count()) return;
for (int i = modelFrames->count() - numFrames; i < modelFrames->count(); i++)
{
@@ -151,10 +152,17 @@ void GraphingWindow::updatedFrames(int numFrames)
if (graphParams[j].ID == thisFrame.ID)
{
appendToGraph(graphParams[j], thisFrame);
appendedToGraph = true;
}
}
}
ui->graphingView->replot();
if (appendedToGraph) {
for (int j = 0; j < graphParams.count(); j++)
{
graphParams[j].ref->setData(graphParams[j].x, graphParams[j].y);
}
ui->graphingView->replot();
}
}
}
@@ -931,8 +939,6 @@ void GraphingWindow::appendToGraph(GraphParams &params, CANFrame &frame)
params.x.append(frame.timestamp - params.xbias);
}
params.y.append((tempVal * params.scale) + params.bias);
params.ref->setData(params.x,params.y);
}
void GraphingWindow::createGraph(GraphParams &params, bool createGraphParam)