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

Method syncHistoryToTimeRange

app/src/UI/Widgets/Waterfall.cpp:468–474  ·  view source on GitHub ↗

* @brief Sizes the time history to the dashboard/project Time Range (rows ~= range * fps). */

Source from the content-addressed store, hash-verified

466 * @brief Sizes the time history to the dashboard/project Time Range (rows ~= range * fps).
467 */
468void Widgets::Waterfall::syncHistoryToTimeRange()
469{
470 static auto& timer = Misc::TimerEvents::instance();
471 const double fps = timer.fps() > 0 ? timer.fps() : 24.0;
472 const double range = UI::Dashboard::instance().plotTimeRange();
473 setHistorySize(static_cast<int>(std::lround(range * fps)));
474}
475
476/**
477 * @brief Sets the lower clip of the dB, color mapping.

Callers

nothing calls this directly

Calls 3

lroundFunction · 0.85
fpsMethod · 0.80
plotTimeRangeMethod · 0.45

Tested by

no test coverage detected