Merge branch 'WIP' of github.com:collin80/SavvyCAN into WIP2
This commit is contained in:
+7
-1
@@ -478,8 +478,14 @@ void MainWindow::filterClearAll()
|
|||||||
|
|
||||||
void MainWindow::tickGUIUpdate()
|
void MainWindow::tickGUIUpdate()
|
||||||
{
|
{
|
||||||
framesPerSec += rxFrames * 1000 / elapsedTime->elapsed() - (framesPerSec / 4);
|
int elapsed = elapsedTime->elapsed();
|
||||||
|
if(elapsed) {
|
||||||
|
framesPerSec += rxFrames * 1000 / elapsed - (framesPerSec / 4);
|
||||||
elapsedTime->restart();
|
elapsedTime->restart();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
framesPerSec = 0;
|
||||||
|
|
||||||
model->sendBulkRefresh(rxFrames);
|
model->sendBulkRefresh(rxFrames);
|
||||||
|
|
||||||
ui->lbNumFrames->setText(QString::number(model->rowCount()));
|
ui->lbNumFrames->setText(QString::number(model->rowCount()));
|
||||||
|
|||||||
@@ -495,18 +495,6 @@ void SerialWorker::handleTick()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int elapsed = elapsedTime->elapsed();
|
|
||||||
if(elapsed) {
|
|
||||||
framesPerSec += gotFrames * 1000 / elapsed - (framesPerSec / 4);
|
|
||||||
elapsedTime->restart();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
framesPerSec = 0;
|
|
||||||
|
|
||||||
emit frameUpdateTick(framesPerSec / 4, gotFrames); //sends stats to interested parties
|
|
||||||
canModel->sendBulkRefresh(gotFrames);
|
|
||||||
gotFrames = 0;
|
|
||||||
|
|
||||||
if (doValidation && serial && serial->isOpen()) sendCommValidation();
|
if (doValidation && serial && serial->isOpen()) sendCommValidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user