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

Method applyVisualizationOptions

app/src/Misc/CLI.cpp:424–439  ·  view source on GitHub ↗

* @brief Applies CLI dashboard FPS and point-count options if set. */

Source from the content-addressed store, hash-verified

422 * @brief Applies CLI dashboard FPS and point-count options if set.
423 */
424void CLI::applyVisualizationOptions()
425{
426 if (m_parser.isSet(m_opts.fpsOpt)) {
427 bool ok;
428 auto fps = m_parser.value(m_opts.fpsOpt).toUInt(&ok);
429 if (ok)
430 Misc::TimerEvents::instance().setFPS(fps);
431 }
432
433 if (m_parser.isSet(m_opts.pointsOpt)) {
434 bool ok;
435 auto points = m_parser.value(m_opts.pointsOpt).toUInt(&ok);
436 if (ok)
437 UI::Dashboard::instance().setPoints(points);
438 }
439}
440
441/**
442 * @brief Dispatches CLI bus configuration to the matching driver setup helper.

Callers 1

mainFunction · 0.80

Calls 3

setPointsMethod · 0.80
valueMethod · 0.45
setFPSMethod · 0.45

Tested by

no test coverage detected