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

Method refreshLatestFrameCapture

app/src/DataModel/FrameBuilder.cpp:529–540  ·  view source on GitHub ↗

* @brief Recomputes the cached latest-frame capture flag (control script or API server active); * drops the retained chunks when every consumer is gone so FrameReader slots unpin. */

Source from the content-addressed store, hash-verified

527 * drops the retained chunks when every consumer is gone so FrameReader slots unpin.
528 */
529void DataModel::FrameBuilder::refreshLatestFrameCapture()
530{
531 const bool wasEnabled = m_captureLatestFrame;
532
533 m_captureLatestFrame =
534 DataModel::ControlScript::instance().running() || API::Server::instance().enabled();
535
536 if (wasEnabled && !m_captureLatestFrame) {
537 m_latestFrames.clear();
538 m_latestFrameSourceId = -1;
539 }
540}
541
542//--------------------------------------------------------------------------------------------------
543// Project model sync

Callers

nothing calls this directly

Calls 3

runningMethod · 0.45
enabledMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected