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

Method zero_adj

DSView/pv/toolbars/samplingbar.cpp:315–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313 }
314
315 void SamplingBar::zero_adj()
316 {
317 for (auto s : _session->get_signals())
318 {
319 if (s->signal_type() == SR_CHANNEL_DSO){
320 view::DsoSignal *dsoSig = (view::DsoSignal*)s;
321 dsoSig->set_enable(true);
322 }
323 }
324
325 const int index_back = _sample_count.currentIndex();
326 int i = 0;
327
328 for (i = 0; i < _sample_count.count(); i++){
329 if (_sample_count.itemData(i).value<uint64_t>() == ZeroTimeBase)
330 break;
331 }
332
333 set_sample_count_index(i);
334 commit_hori_res();
335
336 if (_session->is_working() == false)
337 _session->start_capture(false);
338
339 pv::dialogs::WaitingDialog wait(this, _session, SR_CONF_ZERO);
340 if (wait.start() == QDialog::Rejected)
341 {
342 for (auto s : _session->get_signals())
343 {
344 if (s->signal_type() == SR_CHANNEL_DSO){
345 view::DsoSignal *dsoSig = (view::DsoSignal*)s;
346 dsoSig->commit_settings();
347 }
348 }
349 }
350
351 if (_session->is_working())
352 _session->stop_capture();
353
354 set_sample_count_index(index_back);
355 commit_hori_res();
356 }
357
358 void SamplingBar::set_sample_rate(uint64_t sample_rate)
359 {

Callers

nothing calls this directly

Calls 7

signal_typeMethod · 0.80
is_workingMethod · 0.80
start_captureMethod · 0.80
stop_captureMethod · 0.80
set_enableMethod · 0.45
startMethod · 0.45
commit_settingsMethod · 0.45

Tested by

no test coverage detected