| 473 | } |
| 474 | |
| 475 | void MainWindow::tickGUIUpdate() |
| 476 | { |
| 477 | rxFrames = model->sendBulkRefresh(); |
| 478 | //if(rxFrames>0) |
| 479 | //{ |
| 480 | int elapsed = elapsedTime->elapsed(); |
| 481 | if(elapsed) { |
| 482 | framesPerSec = (framesPerSec + (rxFrames * 1000 / elapsed)) / 2; |
| 483 | elapsedTime->restart(); |
| 484 | } |
| 485 | else |
| 486 | framesPerSec = 0; |
| 487 | |
| 488 | ui->lbNumFrames->setText(QString::number(model->rowCount())); |
| 489 | if (rxFrames > 0 && /*allowCapture && */ ui->cbAutoScroll->isChecked()) ui->canFramesView->scrollToBottom(); |
| 490 | ui->lbFPS->setText(QString::number(framesPerSec)); |
| 491 | if (rxFrames > 0) |
| 492 | { |
| 493 | bDirty = true; |
| 494 | emit framesUpdated(rxFrames); //anyone care that frames were updated? |
| 495 | } |
| 496 | |
| 497 | if (model->needsFilterRefresh()) updateFilterList(); |
| 498 | |
| 499 | if (continuousLogging) |
| 500 | { |
| 501 | const QVector<CANFrame> *modelFrames = model->getListReference(); |
| 502 | FrameFileIO::writeContinuousNative(modelFrames, modelFrames->count() - rxFrames); |
| 503 | |
| 504 | continuousLogFlushCounter++; |
| 505 | if ((continuousLogFlushCounter % 3) == 0) |
| 506 | { |
| 507 | if (ui->lblContMsg->text().length() > 2) |
| 508 | { |
| 509 | ui->lblContMsg->setText(""); |
| 510 | } |
| 511 | else |
| 512 | { |
| 513 | ui->lblContMsg->setText("CONTINUOUS LOGGING"); |
| 514 | } |
| 515 | } |
| 516 | if (continuousLogFlushCounter > 8) |
| 517 | { |
| 518 | continuousLogFlushCounter = 0; |
| 519 | FrameFileIO::flushContinuousNative(); |
| 520 | } |
| 521 | } |
| 522 | |
| 523 | rxFrames = 0; |
| 524 | //} |
| 525 | } |
| 526 | |
| 527 | void MainWindow::gotFrames(int framesSinceLastUpdate) |
| 528 | { |
nothing calls this directly
no test coverage detected