MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / nextFrame

Method nextFrame

app/src/MDF4/Player.cpp:514–534  ·  view source on GitHub ↗

* @brief Advances to the next frame */

Source from the content-addressed store, hash-verified

512 * @brief Advances to the next frame
513 */
514void MDF4::Player::nextFrame()
515{
516 if (!isOpen())
517 return;
518
519 if (isPlaying())
520 pause();
521
522 if (m_framePos < frameCount() - 1) {
523 ++m_framePos;
524
525 UI::Dashboard::instance().clearPlotData();
526
527 int framesToLoad = UI::Dashboard::instance().points();
528 int startFrame = std::max(0, m_framePos - framesToLoad);
529 int endFrame = std::min(frameCount() - 1, m_framePos);
530
531 processFrameBatch(startFrame, endFrame);
532 updateData();
533 }
534}
535
536/**
537 * @brief Steps back to the previous frame

Callers

nothing calls this directly

Calls 2

clearPlotDataMethod · 0.80
pointsMethod · 0.45

Tested by

no test coverage detected