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

Method setMultiplotSweep

app/src/UI/Dashboard.cpp:1387–1415  ·  view source on GitHub ↗

* @brief Configures sweep/trigger mode for a multiplot; gated to commercial tiers. */

Source from the content-addressed store, hash-verified

1385 * @brief Configures sweep/trigger mode for a multiplot; gated to commercial tiers.
1386 */
1387void UI::Dashboard::setMultiplotSweep(const int index,
1388 const bool enabled,
1389 const double level,
1390 const int edge,
1391 const int mode,
1392 const double holdoff,
1393 const int triggerCurve,
1394 const double timebase)
1395{
1396 auto it = m_multiplotSweep.find(index);
1397 if (it == m_multiplotSweep.end())
1398 return;
1399
1400#ifdef BUILD_COMMERCIAL
1401 const auto& tk = Licensing::CommercialToken::current();
1402 const bool ok = enabled && tk.isValid() && SS_LICENSE_GUARD()
1403 && tk.featureTier() >= Licensing::FeatureTier::Trial;
1404#else
1405 const bool ok = false;
1406#endif
1407
1408 auto& engine = it.value();
1409 engine.setTrigger(level, edge, mode, holdoff, triggerCurve);
1410 engine.setTimebase(timebase);
1411 if (engine.enabled != ok) {
1412 engine.enabled = ok;
1413 engine.resetState();
1414 }
1415}
1416
1417/**
1418 * @brief Re-arms a single-shot plot sweep capture.

Callers 1

pushSweepConfigMethod · 0.80

Calls 7

findMethod · 0.80
featureTierMethod · 0.80
setTriggerMethod · 0.80
setTimebaseMethod · 0.80
isValidMethod · 0.45
valueMethod · 0.45
resetStateMethod · 0.45

Tested by

no test coverage detected