MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / set_factor

Method set_factor

DSView/pv/view/dsosignal.cpp:474–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474void DsoSignal::set_factor(uint64_t factor)
475{
476 if (enabled()) {
477 uint64_t prefactor = 0;
478 bool ret;
479
480 ret = session->get_device()->get_config_uint64(SR_CONF_PROBE_FACTOR, prefactor, _probe, NULL);
481 if (!ret) {
482 dsv_err("ERROR: config_get SR_CONF_PROBE_FACTOR failed.");
483 return;
484 }
485
486 if (prefactor != factor) {
487 session->get_device()->set_config_uint64(SR_CONF_PROBE_FACTOR,
488 factor, _probe, NULL);
489 _vDial->set_factor(factor);
490 _view->set_update(_viewport, true);
491 _view->update();
492 }
493 }
494}
495
496uint64_t DsoSignal::get_factor()
497{

Callers 1

load_settingsMethod · 0.45

Calls 5

get_config_uint64Method · 0.80
get_deviceMethod · 0.80
set_config_uint64Method · 0.80
set_updateMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected