MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / set_trig_cursor_posistion

Method set_trig_cursor_posistion

DSView/pv/view/view.cpp:525–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

523}
524
525void View::set_trig_cursor_posistion(uint64_t trig_pos)
526{
527 const double time = trig_pos * 1.0 / _session->cur_snap_samplerate();
528 _trig_cursor->set_index(trig_pos);
529
530 int width = get_view_width();
531 assert(width > 0);
532
533 if (ds_trigger_get_en() ||
534 _device_agent->is_virtual() ||
535 _device_agent->get_work_mode() == DSO) {
536 _show_trig_cursor = true;
537
538 AppConfig &app = AppConfig::Instance();
539 if (app.appOptions.trigPosDisplayInMid){
540 set_scale_offset(_scale, (time / _scale) - (width / 2));
541 }
542 }
543
544 _ruler->update();
545 viewport_update();
546}
547
548void View::set_trig_pos(int percent)
549{

Callers

nothing calls this directly

Calls 6

ds_trigger_get_enFunction · 0.85
cur_snap_samplerateMethod · 0.80
set_indexMethod · 0.80
is_virtualMethod · 0.80
get_work_modeMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected