Various bug fixes to flow view. Incremented version number.

This commit is contained in:
Collin Kidder
2015-05-29 20:11:43 -04:00
parent 918f0e5b61
commit 34d68d7e33
3 changed files with 12 additions and 3 deletions
+9
View File
@@ -146,6 +146,7 @@ void FlowViewWindow::changeID(QString newID)
CANFrame thisFrame = modelFrames->at(x); CANFrame thisFrame = modelFrames->at(x);
if (thisFrame.ID == id) if (thisFrame.ID == id)
{ {
for (int j = thisFrame.len; j < 8; j++) thisFrame.data[j] = 0;
frameCache.append(thisFrame); frameCache.append(thisFrame);
} }
} }
@@ -158,6 +159,9 @@ void FlowViewWindow::changeID(QString newID)
} }
ui->graphView->replot(); ui->graphView->replot();
memcpy(currBytes, frameCache.at(currentPosition).data, 8);
memcpy(refBytes, currBytes, 8);
updateDataView(); updateDataView();
} }
@@ -189,7 +193,12 @@ void FlowViewWindow::btnStopClick()
playbackTimer->stop(); //pushing this button halts automatic playback playbackTimer->stop(); //pushing this button halts automatic playback
playbackActive = false; playbackActive = false;
currentPosition = 0; currentPosition = 0;
memcpy(currBytes, frameCache.at(currentPosition).data, 8);
memcpy(refBytes, currBytes, 8);
updateFrameLabel(); updateFrameLabel();
updateDataView();
} }
void FlowViewWindow::btnPlayClick() void FlowViewWindow::btnPlayClick()
+2 -2
View File
@@ -241,7 +241,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="title"> <property name="title">
<string>Reference Values</string> <string>Reference Values (Hex)</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_8"> <layout class="QVBoxLayout" name="verticalLayout_8">
<item> <item>
@@ -528,7 +528,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="title"> <property name="title">
<string>Current Values</string> <string>Current Values (Hex)</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_9"> <layout class="QVBoxLayout" name="verticalLayout_9">
<item> <item>
+1 -1
View File
@@ -13,7 +13,7 @@
#include "framesenderwindow.h" #include "framesenderwindow.h"
#include "dbchandler.h" #include "dbchandler.h"
#define VERSION 104 #define VERSION 105
namespace Ui { namespace Ui {
class MainWindow; class MainWindow;