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

Function timeRingCapacity

app/src/UI/Dashboard.cpp:66–73  ·  view source on GitHub ↗

* @brief Time-ring capacity for a window: enough for the assumed max rate, capped. */

Source from the content-addressed store, hash-verified

64 * @brief Time-ring capacity for a window: enough for the assumed max rate, capped.
65 */
66static int timeRingCapacity(const double plotTimeRangeSec)
67{
68 const double want = plotTimeRangeSec * kAssumedMaxRateHz;
69 if (want >= static_cast<double>(kMaxTimeRingSamples))
70 return kMaxTimeRingSamples;
71
72 return std::max(kDefaultPlotBuckets, static_cast<int>(want));
73}
74
75/**
76 * @brief Builds a scrolling-history ring for the visible window plus headroom, so a

Callers 3

makeHistoryRingFunction · 0.85
configureLineSeriesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected