Previous commit with merge of fixes from another user added code in the wrong place for this branch and I didn't catch it. Fixed now.
This commit is contained in:
+7
-1
@@ -515,8 +515,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()));
|
||||||
|
|||||||
@@ -478,18 +478,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