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

Method set_enable

DSView/pv/view/dsosignal.cpp:124–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void DsoSignal::set_enable(bool enable)
125{
126 if (session->get_device()->is_hardware_logic()
127 && get_index() == 0){
128 return;
129 }
130
131 _en_lock = true;
132 bool cur_enable;
133 bool ret;
134 ret = session->get_device()->get_config_bool(SR_CONF_PROBE_EN, cur_enable, _probe, NULL);
135
136 if (!ret) {
137 dsv_err("ERROR: config_get SR_CONF_PROBE_EN failed.");
138 _en_lock = false;
139 return;
140 }
141 if (cur_enable == enable) {
142 _en_lock = false;
143 return;
144 }
145
146 bool running = false;
147
148 if (session->is_running_status()) {
149 running = true;
150 session->stop_capture();
151 }
152
153 while(session->is_running_status())
154 QCoreApplication::processEvents();
155
156 set_vDialActive(false);
157 session->get_device()->set_config_bool( SR_CONF_PROBE_EN,
158 enable, _probe, NULL);
159
160 _view->update_hori_res();
161
162 if (running) {
163 session->stop_capture();
164 session->start_capture(false);
165 }
166
167 _view->set_update(_viewport, true);
168 _view->update();
169 _en_lock = false;
170}
171
172void DsoSignal::set_vDialActive(bool active)
173{

Callers 5

lissajous_disableMethod · 0.45
math_disableMethod · 0.45
zero_adjMethod · 0.45
changeTextMethod · 0.45
acceptMethod · 0.45

Calls 10

is_hardware_logicMethod · 0.80
get_deviceMethod · 0.80
get_config_boolMethod · 0.80
is_running_statusMethod · 0.80
stop_captureMethod · 0.80
set_config_boolMethod · 0.80
update_hori_resMethod · 0.80
start_captureMethod · 0.80
set_updateMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected