A partial commit that changes CANFrame over to be based on

QCanBusFrame so that things are more compatible with other Qt based
CAN bus code. Not complete yet but getting there.
This commit is contained in:
Collin Kidder
2019-12-11 21:17:33 -05:00
parent 29b635a009
commit 0baffa300f
22 changed files with 272 additions and 278 deletions
+6 -6
View File
@@ -196,13 +196,13 @@ void TemporalGraphWindow::generateGraph()
x.reserve(frameCount);
y.reserve(frameCount);
xminval = xmaxval = modelFrames->at(0).timestamp / 1000000.0;
yminval = ymaxval = modelFrames->at(0).ID;
xminval = xmaxval = modelFrames->at(0).timeStamp().microSeconds() / 1000000.0;
yminval = ymaxval = modelFrames->at(0).frameId();
for (int i = 0; i < frameCount; i++)
{
x.append(modelFrames->at(i).timestamp / 1000000.0);
y.append(modelFrames->at(i).ID);
x.append(modelFrames->at(i).timeStamp().microSeconds() / 1000000.0);
y.append(modelFrames->at(i).frameId());
if (x[i] > xmaxval) xmaxval = x[i];
if (x[i] < xminval) xminval = x[i];
if (y[i] > ymaxval) ymaxval = y[i];
@@ -246,8 +246,8 @@ void TemporalGraphWindow::generateGraph()
for (int i = 0; i < frameCount; i++)
{
int x = static_cast<int>(((modelFrames->at(i).timestamp / 1000000.0) - xminval) * 4.0);
int y = static_cast<int>(modelFrames->at(i).ID - yminval) / 30;
int x = static_cast<int>(((modelFrames->at(i).timeStamp().microSeconds() / 1000000.0) - xminval) * 4.0);
int y = static_cast<int>(modelFrames->at(i).frameId() - yminval) / 30;
double val = colorMap->data()->cell(x, y);
double inc;
inc = 1 / (val + 1); //logarithmic decay