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:
Collin Kidder
2016-05-31 19:55:20 -04:00
parent d5735a4908
commit be203ffef3
2 changed files with 8 additions and 14 deletions
+8 -2
View File
@@ -515,8 +515,14 @@ void MainWindow::filterClearAll()
void MainWindow::tickGUIUpdate()
{
framesPerSec += rxFrames * 1000 / elapsedTime->elapsed() - (framesPerSec / 4);
elapsedTime->restart();
int elapsed = elapsedTime->elapsed();
if(elapsed) {
framesPerSec += rxFrames * 1000 / elapsed - (framesPerSec / 4);
elapsedTime->restart();
}
else
framesPerSec = 0;
model->sendBulkRefresh(rxFrames);
ui->lbNumFrames->setText(QString::number(model->rowCount()));
-12
View File
@@ -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();
}