diff --git a/flowviewwindow.cpp b/flowviewwindow.cpp index 2326110..8798af5 100644 --- a/flowviewwindow.cpp +++ b/flowviewwindow.cpp @@ -146,6 +146,7 @@ void FlowViewWindow::changeID(QString newID) CANFrame thisFrame = modelFrames->at(x); if (thisFrame.ID == id) { + for (int j = thisFrame.len; j < 8; j++) thisFrame.data[j] = 0; frameCache.append(thisFrame); } } @@ -158,6 +159,9 @@ void FlowViewWindow::changeID(QString newID) } ui->graphView->replot(); + memcpy(currBytes, frameCache.at(currentPosition).data, 8); + memcpy(refBytes, currBytes, 8); + updateDataView(); } @@ -189,7 +193,12 @@ void FlowViewWindow::btnStopClick() playbackTimer->stop(); //pushing this button halts automatic playback playbackActive = false; currentPosition = 0; + + memcpy(currBytes, frameCache.at(currentPosition).data, 8); + memcpy(refBytes, currBytes, 8); + updateFrameLabel(); + updateDataView(); } void FlowViewWindow::btnPlayClick() diff --git a/flowviewwindow.ui b/flowviewwindow.ui index 9927a22..957d5a0 100644 --- a/flowviewwindow.ui +++ b/flowviewwindow.ui @@ -241,7 +241,7 @@ - Reference Values + Reference Values (Hex) @@ -528,7 +528,7 @@ - Current Values + Current Values (Hex) diff --git a/mainwindow.h b/mainwindow.h index 872018b..c3e8677 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -13,7 +13,7 @@ #include "framesenderwindow.h" #include "dbchandler.h" -#define VERSION 104 +#define VERSION 105 namespace Ui { class MainWindow;